Forum Discussion

wcl3y2's avatar
wcl3y2
New Contributor III
6 years ago

401 - Invalid Access Token

I set up a triggered task, but I am getting an invalid access token when attempting to call it from SOAPUI or a C# application. I am just adding the bearer token in an Authorization header like this:

httpClient.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue(“Bearer”, “xxxxxxxxxxxxxxxxx”);

I am getting the bearer token from the task. Is there any other reason I would get this error?

3 Replies

  • lazo_ilijoski's avatar
    lazo_ilijoski
    New Contributor III

    HTTP errors 4xx are on the client side, and 5xx are referred to server side. Just for information for easier troubleshooting in the future.

    /Lazo

  • That looks like it should work. Does it work from any HTTP client? Like cURL for example?

    • wcl3y2's avatar
      wcl3y2
      New Contributor III

      False alarm. I wasn’t paying attention. The error was occurring on a REST call that I had in the pipeline.