+ 1
Asp.Net core Authorization with Bearer token status Unauthorized 401
I'm trying to do a get method using Postman with a valid token but the status is Unauthorized. Does anyone have any clue why?
3 Réponses
+ 2
Cristina Unfortunately, we're flying blind without knowing anything about the request details.
Is the token manually extracted from a browser session, are you using interception, or scripting via the Postman sandbox?
Is the bearer token enough and is it correctly setup in the request header?
Are you able to test using the token in a replay feature in Chrome DevTools or Fiddler or via console commands?
Is the token being applied via an environment variable within Postman or just hardcoded into the request?
0
Did you add the token in request header? Or, maybe the token expired. Unauthorized because of that. Check your server logs or the API you're sending request to.
0
The token is a valid one and the request was done correctly. I think the problem is that the Claims size is 0, but I don't know why it's empty.