Hi @itcloudnet,
Thanks for the reply.
If you are using "grant_type":"client_credentials"
, please make sure that your request specifies this. I noticed in your first curl command that you got the Grant type 'authorization_code' not allowed for the client.
error message. Note that the authorization code flow and client credentials flow are separate flows and uses slightly different parameters in their request.
Please ensure that your client credentials request looks something like the following:
curl --request POST \
--url 'https://YOUR_DOMAIN.us.auth0.com/oauth/token' \
--header 'content-type: application/x-www-form-urlencoded' \
--data grant_type=client_credentials \
--data client_id=YOUR_CLIENT_ID \
--data client_secret=YOUR_CLIENT_SECRET \
--data audience=YOUR_API_IDENTIFIER
(Reference: Call Your API Using the Client Credentials Flow)
Could you give that a try and let me know how it goes for you?
Thanks,
Rueben