Running into an issue where my bearer token is getting returned as 0. I’m pretty new at the Atlassian software development, so I’m hoping someone could help clarify a few things for me:
Is it possible for me to pass a Bearer token (using user impersonation) as the authorization header for the /rest/api/3/webhook endpoint?
Is it okay that I created a new OAuth credential in the app management area, and am using this to generate my Bearer token? I’m not looking to create a Jira plug-in or add-on, just an app (i.e. the bare minimum amount of setup necessary on the Jira side for users to run my app)
I’m also using the node package for oauth2 found here, could this be why I’m not getting a bearer token?
Here is my printing of my bearer token id:
My scopes togged are “read,” “write,” “act_as_user.”
@Helen welcome to the Atlassian developer community. Apologies for the multiple OAuth implementations around Jira (I’m counting 4 so far), which is surely the cause of your confusion.
If you use OAuth 2 3LO, then you are not using Atlassian Connect, which uses a different OAuth implementation. So if you are managing your credentials through the developer console (what I think you mean by the app management area), then you cannot use /rest/api/3/webhooks/. As stated in the API docs:
There is still an older /rest/webhooks/1.0/webhook that will accept an API token. You can find it at the bottom of the documentation on Jira Cloud webhooks in other integrations. You won’t be able to impersonate another user.
I’m glad you are making progress. I’m still confused about how your App works.
I think ngrok can show you a request, even if it fails. Hence, it is reaching the right host, but not the right path. It’s hard to offer more advice for your situation since I know so little about your context.