79273356

Date: 2024-12-11 22:36:58
Score: 1
Natty:
Report link

This was a nasty one took me hours to finally figure out, in this documentation Fetch OAuth token you will notice the curl has last line data-urlencode, the line above this doesn't have new line backslash

enter image description here

So when i was running this curl the token was getting generated but it was missing the authorization_details

For fixing this you have to make sure that your fetch token curl is complete and looks like this

      export CLIENT_ID=<client-id>
      export CLIENT_SECRET=<client-secret>
      export ENDPOINT_ID=<endpoint-id>
      export ACTION=<action>

      curl --request POST \
      --url <token-endpoint-URL> \
      --user "$CLIENT_ID:$CLIENT_SECRET" \
      --data 'grant_type=client_credentials&scope=all-apis' \
      --data-urlencode 'authorization_details=[{"type":"workspace_permission","object_type":"serving-endpoints","object_path":"'"/serving-endpoints/$ENDPOINT_ID"'","actions": ["'"$ACTION"'"]}]'

Now this is complete and should get you the response

Reasons:
  • Blacklisted phrase (1): this document
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Tidalcharter