You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{Bitbucket}from"bitbucket";constapiToken='Token as copied from https://id.atlassian.com/manage/api-tokens';constbitbucket=newBitbucket({baseUrl: 'https://api.bitbucket.org/2.0',auth: {token: apiToken,}});constrepos=bitbucket.user.get({}).then(value=>{console.log(value.data);});
BITBUCKET CLOUD API LATEST UPDATES: https://developer.atlassian.com/cloud/bitbucket
index.ts:11
Process exited with code 1
Uncaught i HTTPError: Unauthorized
at <anonymous> (/wrk/bitbucket/node_modules/bitbucket/src/request/fetch-wrapper.ts:48:17)
at processTicksAndRejections (internal/process/task_queues:95:5)
The text was updated successfully, but these errors were encountered:
What am I doing wrong here?
Consider the following code:
Steps to reproduce
Expected
The current user is being logged.
Actual
The text was updated successfully, but these errors were encountered: