0

As per the documentation https://doc.sitecore.com/xmc/en/developers/xm-cloud/managing-xm-cloud-authentication-clients.html, I created a Authentication Client in XM Cloud Deploy App at the Organization level and i got the Client ID and Client Secret.

As a next step, i tried to get JWT token by following this document https://doc.sitecore.com/xmc/en/developers/xm-cloud/request-a-jwt-for-the-cm-instance-using-oauth.html, and run curl command like below.

curl --request POST --url "https://auth.sitecorecloud.io" --header "content-type: application/x-www-form-urlencoded" --data grant_type=client_credentials --data client_id=<clientid> --data client_secret=<clientsecret> --data audience=https://api.sitecorecloud.io

But i always get 404 Not Found response back.

Am i doing something wrong here?

Is there any other way to generate JWT token to trigger XM Cloud APIs?

1 Answer 1

0

I got the response from Product team and they mentioned that the url we are passing in the request is not correct and Documentation has to be updated by Sitecore Docs team.

Here is the correct curl request.

curl --request POST --url "https://auth.sitecorecloud.io/oauth/token" --header "content-type: application/x-www-form-urlencoded" --data grant_type=client_credentials --data client_id=<clientid> --data client_secret=<clientsecret> --data audience=https://api.sitecorecloud.io

Woohoo, i tried with this, and it worked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.