The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to authenticate API V2

ryan yang
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 20, 2021

I'm unable to get an authorization bearer token using the V2 API. Am I doing something incorrect?

curl -X POST -u "client_id:secret" \
https://bitbucket.org/{COMPANY}/oauth2/access_token -d grant_type=password \
-d username={MY_USERNAME} -d password={MY_PERSONAL_ACCESS_TOKEN}

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
ryan yang
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 20, 2021

With the Rest V1 api, I could easily reach endpoints in the format:

curl "https://stash.{COMPANY}.com/rest/api/1.0/projects/{Project_KEY}/repos/{Repo_slug}/settings/hooks?type=POST_RECEIVE" \
-u {USERNAME}:{MY_PERSONAL_ACCESS_TOKEN} \
--request GET \
--header 'Content-Type: application/json'

However, I can't do the same for V2

TAGS
AUG Leaders

Atlassian Community Events