I've been recently trying to create a JQL query through postman however I cannot create any bearer token. I can create personal APIs but these doesn't fullfill what we need, basic tokens expire and we need to authenticate our service through a Bearer token.
There are no clear explanations on how to do this. Does anyone had the step-by-step guide?
Hi @Leandro Cardoso, the confusion is common because there's no UI flow in Atlassian Cloud labeled "create Bearer token". The way to get a real Bearer token in Cloud is through a Service Account.
The personal API tokens you've been creating only support Basic auth against your-site.atlassian.net (Authorization header with base64 of email:token). They cannot be used as Bearer tokens.
For service-to-service authentication that uses a Bearer token, the setup is:
read:jira-work as a minimum.https://api.atlassian.com/ex/jira/{cloudId}/rest/api/3/search with header Authorization: Bearer {your-api-token}.The Cloud ID is the UUID after /s/ in your admin URL. Don't use the Organization ID, that one returns 404.
Official doc with the full flow and a curl example: Manage API tokens for service accounts
Hey @Leandro Cardoso ,
On top of what German said, I've seen cases where people used Developer console to create a new OAuth 2.0 integration app and used something like that for making endpoint calls and authorizations.
But that might be overkill...
What I actually wanted to share, and it's related to service accounts, are these couple of articles:
Rebekka did a really good job in explaining service accounts and using them in real-life scenarios, so I believe this could help 📚
Cheers,
Tobi
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.