I am writing a CURL in groovy script to fetch the branches in a repository, the initials URL ( access token is working but the second URL to fetch the branches for repo is not working .
1st CURL to get the access token :
When i use the access token and execute the second URL , its says "Access denied. You must have write or admin access".
Can you please let me know, how to solve the issue. Thanks in Advance
Hi @Hbandhu, welcome to the Community!
I'm assuming that you pasted the access token correctly and that the URL you're using is the correct one. To confirm this, you could use the same access token with a different URL and check the results. You could also let us know the URL you're using so we can check if it's right.
I can see in your screenshot that you have changed the Authorization: Bearer {access_token} for
Authorization: token {access_token}.
Can you change it back to Bearer as recommended in our documentation and let us know if it works?
For troubleshooting purposes, if after having tried the above you're still having issues, you could try to use a different request, as per the documentation at Oauth on Bitbucket Cloud:
Authorization: Bearer {access_token}
access_token={access_token}
?access_token={access_token}
Hope that helps,
Ana
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.