Forums

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

Does the API Token authorization work with the legacy v1 /groups endpoints

Noor Ahmadi
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!
August 5, 2025

I am attempting to use the legacy v1 endpoint 

GET https://api.bitbucket.org/1.0/groups/{workspace}/{group_slug}

with the new api token auth method but it does not work. It says:

 162{"type": "error", "error": {"message": "You do not have access to view this workspace."}}

I run this call:

curl --request GET \
--url 'https://api.bitbucket.org/1.0/groups/{workspace}/{group_slug}' \
--user '{atlassian_account_email}:{api_token}' \
--header 'Accept: application/json'

 

calls like https://api.bitbucket.org/2.0/user and https://api.bitbucket.org/2.0/workspaces/<workspace> work correctly so im wondering if it has to do with the /groups being legacy 1.0. To my knowledge the specific endpoint that I am using does not have a 2.0 version.

 

These are the permissions I have on the service account:

Screenshot 2025-08-05 153205.png

1 answer

1 accepted

0 votes
Answer accepted
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 6, 2025

Hi Noor,

API Tokens work fine when I've executed these against the /1.0/groups endpoint with the following scope:

  • admin:workspace:bitbucket

Here's my command:

curl --request GET \
--url 'https://api.bitbucket.org/1.0/groups/workspaceID/groupslug' \
--user useremail:APIToken

Do you have workspace admin privileges for the workspace you're attempting to query? If not, this call will fail as your actual user account privileges take precedence over the permissions scopes you have configured.

Cheers!

- Ben (Bitbucket Cloud Support)

 

Noor Ahmadi
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!
August 7, 2025

Hi Ben, the account used is a service account. I ran 'https://api.bitbucket.org/2.0/user/permissions/workspaces' curl and got back that it has "permission": "member". Could that be the issue? does it need to be bumped up to collaborator or owner? 

Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 7, 2025

Hi @Noor Ahmadi 

Correct - even if you have admin scope on the token, Bitbucket will first validate the actual user permissions of the user account tied to the token first to determine if the user account permissions oo the workspace match those of the token scope. This is to prevent privilege escalation attacks.

Cheers!

- Ben (Bitbucket Cloud Support)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events