Guest User

Guest User

  • Tech Writer
  • 98
  • 42.4k

Passing Token to other API

Feb 10 2021 6:41 AM
I'm using JWT, I login to an API that return a token
 
api/Authentication/Login
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiYmx1ZWkyIiwianRpIjoiZTViMWFmZWItNDRjYi00NzBiLWJjZDAtYjU2ZjcyNjlhYzY0IiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjoiQWRtaW4iLCJleHAiOjE2MTI5NDk4MzEsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6NDQzMjMiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0OjQyMDAifQ.A5tuKSDXWbxkF_Fncrb44Itm_BVh5UmyUSrL3onFdb0",
"expiration": "2021-01-10T09:37:11Z"
}
 
How can I pass the token to other API like:
 
api/Product/GetAll
 
because my problem is the token how to pass it to an API.. Do I need to add a parameter "string token"?

Answers (2)