Question

How to add the Acceess token in the http header?

  • 18 February 2022
  • 1 reply
  • 81 views

I add bearer token in Http Header to get user data api show 401 error


Please check below image 1 . I have use api login detail its working and  give accessToken

But When I user trigger for read data I got error 401 I have add Bearer Token in Http Header Show Image 2 Below 
 


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

Userlevel 7
Badge +9

If your API has you exchanging a username and password for a token, and you’re meant to include the token to authorize subsequent API requests, you’ll want to look at Session auth, or OAuth 2 if you’re using the application code grant flow. 

Basic auth doesn’t seem like what you’re after. And you won’t be hard coding a token in the header - you’ll reference a variable - something like `bundle.authData.yourToken`. In the UI tool you can type `{{` and get tab completion to pick available variables.