We're trying to write a Forge app for the Bitbucket sidebar (module bitbucket:repoCodeOverviewCard). For this app we need to be able to call these endpoints:
When calling these, this is the error that I get:
{
"type": "error",
"error": {
"message": "This resource does not support authentication using OAuth tokens."
}
}
The API docs say the scope that is needed is: pipeline
I have tried both:
- read:pipeline:bitbucket
- admin:pipeline:bitbucket
Is there any way to call these endpoints from within a Forge app?
Solved! Go to Solution.
Hey @Alex Figliolia ,
The short answer is that these endpoints can't be called from a Forge app today.
The slightly longer answer is available here.
And here is how I go about finding out if an endpoint is available from a Forge app or not (with screenshot).
For a REST API to be available in Forge, it needs to have Forge app scopes.
Here is an example from another endpoint:
Because the endpoints you mentioned only have OAuth 2.0 scopes (and no Forge app scopes), they can't be called from a Forge app.
(I couldn't find a ticket on jira.atlassian.com and I'm asking if there is one. I'll add it here if there is one already.)
Cheers,
Caterina
@Caterina Curti thanks so much, I figured this would require a development change in the API. I couldn't find a ticket either, but for some reason, I do not have permission to create one in the BCLOUD project. I can create tickets for most of the other projects.
@Alex Figliolia - just a quick note to say that these endpoints are coming very soon, the team is just wrapping up work on a major Forge related release for Pipelines, and then we'll be moving over to supporting all the remaining Pipelines related API's in Forge.
@Alex Figliolia I think this is the most important answer to your follow-up question (thanks Edmund).
I'm checking why the BCLOUD project is setup in a different way, I don't have an answer to that yet.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.