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 réponses
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
répondu il y a un an
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
répondu il y a un an

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions