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