Forums

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

Why am I receiving an unauthorized error when calling an API?

C0666379
July 30, 2026

Ok, so the *I* is not actually me, it's my boss

 

We are creating an automation which calls an API, specifically this one: https://developer.atlassian.com/cloud/forms/rest/api-group-forms-on-issue/#api-issue-issueidorkey-form-formid-attachment-get

 

My boss is an org admin and is in the jsm-users group

 

He created a token in the security page on his profile, encoded the token in Base64, and used it as Basic Authorization, in the form: Authorization Basic {EncodedToken}

 

Yet it returns a 401 Unauthorized error, what else is missing?

2 answers

0 votes
Trudy P Claspill
Community Champion
July 30, 2026

Hello @C0666379 

Did your boss create their token with or without scopes?

If with, did they give it the scope required by the endpoint?

Is your boss able to see the form in the issue through the UI?

Can you confirm also that you have provided the correct URL in your Send Web Request?

https://api.atlassian.com/jira/forms/cloud/{cloudId}/issue/{issueIdOrKey}/form/{formId}/attachment

And have you substituted the correct Cloud ID for your Jira/JSM instance as obtained through this endpoint?

 https://your-domain.atlassian.net/_edge/tenant_info

0 votes
Martin Runge
Community Champion
July 30, 2026

Hi @C0666379

Basic Auth for Jira Cloud REST calls needs an email:API token, not just the token alone. So the string to Base64 encode should be his Atlassian account email plus a colon plus the API token, for example boss@company.com:ATATT3xFf....

Encoding just the token by itself gives invalid Basic Auth credentials, which is why he gets a 401.

Cheers, Martin

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events