- Le plus récent
- Le plus de votes
- La plupart des commentaires
Hi,
Both the POST
method and /oauth2/token
path seem correct. Could you check that you are sending the Content-Type
header with application/x-www-form-urlencoded
as value? According to AWS documentation, this header is mandatory and must contain the indicated value.
You must make a POST
request to the /token
endpoint of your Cognito user pool. Please refer to the steps mentioned under "Client credentials grant" section of this article.
I did follow the article but still get 405. See below... curl "https://testservice.auth.us-west-2.amazoncognito.com/oauth2/token" -X POST -d "grant_type=client_credentials&client_id=6tl85tkf7ageolj63ps9pdekf&scope=test/user" -H "Authorization: Basic NnRsODV0a2Y3YWdlb2xqNjNwczlwZGVrZjprZWMyNDcwMnV1N3RrdGkxbWIyOWNmZGdpZ2pkMTVkcGM5Mzc4MjBlN2ZyMnZmMG9pMjY="
Contenus pertinents
- demandé il y a 7 mois
- demandé il y a 2 mois
- demandé il y a un an
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 4 mois
Thank you, I finally got it working after adding content-type to the header as you suggested.