Creatio API Oauth Access "unsupported_grant_type" issue with client credentials
Hi,
I'm trying to generate Bearer token using the approach explained in this link in our DEV platform which runs as a Cloud instance: https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/8.0/integrations-and-api/authentication/oauth-2-0-authorization/identity-service-overview#title-2830-2
I'm receiving "unsupported_grant_type" error. I tried both Postman client and Powershell script and got the same error message. Do you have any idea about this issue? Many thanks.
Like
Hello,
According to the instructions, the token request should be sent to the Identity Service URL in the following format:
https://[Identity Service URL]/connect/token
You can find the correct Identity Service URL in the system settings using the code "OAuth20IdentityServerUrl".
Please note that this issue most commonly occurs when the request is sent to an incorrect URL. In Creatio cloud, the Identity Service URL typically corresponds to your site name with the -is suffix. It is important to ensure that:
- the URL exactly matches the value from the system setting
- no extra characters or incorrect digits are included
- the request is sent specifically to the
/connect/tokenendpoint
The request itself should be structured as follows:
curl --location 'https://myidentityservice/connect/token' \ --data-urlencode 'client_id=•••••••' \ --data-urlencode 'client_secret=•••••••' \ --data-urlencode 'grant_type=client_credentials'
I recommend double-checking the URL you are using against the system setting to ensure it is correct.
Hello,
According to the instructions, the token request should be sent to the Identity Service URL in the following format:
https://[Identity Service URL]/connect/token
You can find the correct Identity Service URL in the system settings using the code "OAuth20IdentityServerUrl".
Please note that this issue most commonly occurs when the request is sent to an incorrect URL. In Creatio cloud, the Identity Service URL typically corresponds to your site name with the -is suffix. It is important to ensure that:
- the URL exactly matches the value from the system setting
- no extra characters or incorrect digits are included
- the request is sent specifically to the
/connect/tokenendpoint
The request itself should be structured as follows:
curl --location 'https://myidentityservice/connect/token' \ --data-urlencode 'client_id=•••••••' \ --data-urlencode 'client_secret=•••••••' \ --data-urlencode 'grant_type=client_credentials'
I recommend double-checking the URL you are using against the system setting to ensure it is correct.