Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to hit the REST API using OAuth 2.0 access token

Deleted user January 31, 2019

I followed this documentation to set up a 3LO authentication for my external app => JIRA.

Documentation: OAuth2.0 3LO for external app

I first got the authorization_code using my CLIENT_ID & CLIENT_SECRET which I exchanged for an access_token like this:

eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6Ik16bERN
...
...
...
zRiR09CajZpQjNxVmpHM0lwb3dqVTdDIiwiaHR0cHM6LyET4prYg

Too big? other access tokens I found in online Q&As seemed to be much shorter.

With the access_token as a Bearer Authorization token I hit 

https://api.atlassian.com/oauth/token/accessible-resources

and got this response (cloud id)

[{
"id": "SECRET-e--7---8--0-SECRET",
"name": "SECRET",
"scopes": [
SOME_SCOPE_1,
SOME_SCOPE_2
],
"avatarUrl": "https://site-admin-avatar-cdn.prod.public.atl-paas.net/avatars/987/avatar.png"
}]

This is how far I could get with the Atlassian API. When I try to actually hit my JIRA account to do something useful, I get this:

https://api.atlassian.com/ex/jira/my-secret-cloud-id/api/latest/permissions

Oops, you've found a dead link.

  • Go back to the previous page
  • Go to the Home Page

Atlassian

 

I tried scouring the Atlassian community, but couldn't find out what went wrong here.

I also:

1) Destroyed and recreated the access_token for my app to ensure the token is valid.

2) Made sure that I have the proper access for the resources I hit.

The above response is consistent for every resource that I hit such as project / issue etc., I must be missing something very basic here.

 

Need help!

Many thanks,

Ram

1 answer

1 accepted

0 votes
Answer accepted
Deleted user January 31, 2019

It turns out I made a boo-boo with the URL:

https://api.atlassian.com/ex/jira/my-secret-cloud-id/api/latest/permissions

instead of

https://api.atlassian.com/ex/jira/my-secret-cloud-id/rest/api/latest/permissions

Excuse me

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events