pratiks
8/14/2017 - 2:15 PM

Fetch Oauth Token

Fetch Oauth Token

# fetch a users oauth token 
curl --request POST \
  --url 'https://atlassian-account-stg.pus2.auth0.com/oauth/token' \
  --header 'content-type: application/json' \
  --data '{"grant_type":"client_credentials","client_id": "iWdQfRn50fYQB7ZZo9rnLWrLw2xNdIn0","client_secret": "P4w9dHFvC-H3L67jDK73iRTFUosk2aEsDAkYyydpL6zGnivBIcaD7dHrblGmJFRK","audience": "api.stg.atlassian.com"}'


# fetch a user's oauth token
asap curl -v -X POST -H 'Content-Type: application/json' https://oauth-management.staging.atl-paas.net/api/clientGrants -d '{ "oauthClientId": "iWdQfRn50fYQB7ZZo9rnLWrLw2xNdIn0", "resourceAri": "ari:cloud:hipchat.cloud:a436116f-02ce-4520-8fbb-7301462a1674:conversation/97be9e1a-9aa8-42c9-85ce-d1367b3f0d27", "scopes": ["participate:conversation"], "audience": "api.stg.atlassian.com"}'