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?
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?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.