Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Unable to call any existing BitBucket Rest Api from Bit Bucket Forge App

Rishabh Gupta
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 29, 2024

Hi

I am trying to call the bit bucket API from the forge App. I tried testing with a different API still getting the same error

Ex--

 

const data = await api.asApp().requestBitbucket(route`/2.0/repositories`, {

method: "GET",

headers: {

"Content-Type": "application/json",

Accept: "application/json",

},

});
Getting this Error --
PROXY_ERR: Forge platform failed to process runtime HTTP request - 400 - INVALID_TARGET_URL
at null.handleProxyResponseErrors (webpack://product-trigger/node_modules/@forge/api/out/api/fetch.js:84:1)
at null.<anonymous> (webpack://product-trigger/node_modules/@forge/api/out/api/fetch.js:29:1)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at Object.run (webpack://product-trigger/src/index.jsx:32:1)
at async r.<computed> (/tmp/tunnel-114967-qgFrxMSN6RPv/index.cjs:2:139869)
at async process.<anonymous> (/home/beehyv/.nvm/versions/node/v14.21.3/lib/node_modules/@forge/cli/node_modules/@forge/tunnel/out/san
dbox/sandbox-runner.js:7:20) {
status: 400,
errorCode: 'INVALID_TARGET_URL'
} Error Occured

1 answer

1 accepted

0 votes
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 31, 2024

Hi Rishabh and welcome to the community!

This page has some example apps for Bitbucket:

Links are provided with the source code of these apps so you can see how API calls can be made.

If you are still experiencing issues, please join this group and post your question there:

This group is specifically for Forge with Bitbucket Cloud.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events