Failure creating a token for auth0-authorization-extension-api

Trying to get a token for authentication API access, I get

{"code":404,"message":"unable to resolve jtn to webtask token","req_id":"1550684083612.753095"}paul:dev$ 

The request is done through curl:

+ curl --request POST --url https://idigitalasset.us.webtask.io/adf6e2f2b84784b57522e3b19dfc9201/oauth/token \
--header 'content-type: application/json' \
--data '{"grant_type":"client_credentials","client_id": "<hidden>","client_secret": "<hidden>","audience": "urn:auth0-authz-api"}' 

I can find no solution to this in documentation - help is appreciated. The request looks right…

If you want to obtain an access token to call the Authorization Extension API then have in mind that the URL to obtain the token is different then the URL to call the API.

In particular, you’re performing a request to https://idigitalasset.us.webtask.io/adf6e2f2b84784b57522e3b19dfc9201/oauth/token and as indicated in (Call Your API Using the Client Credentials Flow) you need to call the token endpoint of the tenant in which the extension is installed.

In other words you should be getting a token from a URL similar to https://YOUR_AUTH0_DOMAIN/oauth/token; in your case your tenant seems to be idigitalasset@us so the token endpoint would be located at https://idigitalasset.auth0.com/oauth/token.

After having obtained the access token you then do need to call the API at an URL such as https://YOUR_TENANT.us.webtask.io/adf6e2f2b84784b57522e3b19dfc9201/api.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.