Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

OAuth(2.0) for app. Resource selection.

Pavel Naydanov July 22, 2019

I followed this documentation OAuth 2.0(3LO) for apps. 

  • I get 
    https://auth.atlassian.com/authorize?
      audience=api.atlassian.com&
      client_id=YOUR_CLIENT_ID&
      scope=REQUESTED_SCOPE_ONE%20REQUESTED_SCOPE_TWO&
      redirect_uri=https://YOUR_APP_CALLBACK_URL&
      state=YOUR_USER_BOUND_VALUE&
      response_type=code&
      prompt=consent
  • As a result, I received an authorization window and selected Authorize forScreenshot_1.png
  • Then I made a request for cloudId according to the documentation.  
  • curl --request GET \
      --url https://api.atlassian.com/oauth/token/accessible-resources \
      --header 'Authorization: Bearer ACCESS_TOKEN' \
      --header 'Accept: application/json'
  • In response, I received an array of resources (sites, domains).

How can I choose programmatically which of the resources was selected by the user?

 

Need help!

Many thanks,

PNaydanov

0 comments

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events