Authorization for API

0

I have generated client id and client secret, and with the help of this bearer token is also generated but after hitting API, it is showing Error 401 Unauthorized. How this problem can be resolved? Procedure I used First I had account id through my management account. Then I created user with administrator permissions and generated its access key and secret access key, through which on terminal with the help of curl command I generated the session token(bearer token), but postman is showing unauthorized.

2 Answers
1

**Verify the token scope: ** Ensure that the bearer token you generated has the necessary permissions to access the API resource you're trying to access. Some APIs require specific scopes or permissions for certain endpoints, so review the API documentation to ensure that your token has the appropriate permissions.

**Check the token expiration: ** Bearer tokens typically have a limited lifespan. If your token has expired, you will need to generate a new one.

profile picture
EXPERT
answered a year ago
1

Authorization to AWS APIs uses Sigv4. Here is a description on how request signing work.

If you use any AWS SDK (eg boto3) this process is done for you. If you want to test the access via command line (eg via cURL) you can use awscurl.

AWS
EXPERT
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions