Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to get the list of scopes of an App-password?

Mohammed Muthahhar March 12, 2023

I want to  get the list of scopes of an app-password to check whether the needed scopes are given to the specific app-password. 
I tried the a curl which was mentioned in stackOverflow 

curl -sS -f -I -u <username>:<app_password> https://api.bitbucket.org/ | grep ^x-oauth-scopes: | cut -d' ' -f2- | tr -d "[:space:]" | tr ',' '\n'

 but it gives some error as 
`Error while importing Curl: Only the URL can be provided without an option preceding it. All other inputs must be specified via options.`
in postman

1 answer

0 votes
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 13, 2023

Hi Mohammed,

That is not a valid API endpoint. Unfortunately, there is no visibility of App Passwords in our API or their properties as this is considered sensitive data.

An App Password has its scope configured a single time and this cannot be edited, if you wish to modify scope - I would suggest deleting your App Password, creating a new one and taking note of the scope that you have defined.

Cheers!

- Ben (Bitbucket Cloud Support)

Mohammed Muthahhar March 13, 2023

Thanks Ben,

But I am in a need of a way to check the scopes of a given App-password to verify that the expected scopes are given to that App-passwrd

Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 13, 2023

Hey Mohammed,

The API reference you have shared relates to OAuth scopes via access tokens, this is unrelated to the scopes configured on an App Password. 

Unfortunately, you will be unable to gain the scope information on a current App Password as these are unable to be viewed/edited once they are created.

I have raised a feature request on your behalf to our developers to improve this, however - feel free to "Watch" to receive updates and "Vote" for it to increase its visibility with regard to customer demand:
https://jira.atlassian.com/browse/BCLOUD-22540

Cheers!

- Ben (Bitbucket Cloud Support)

Mohammed Muthahhar March 13, 2023

Thanks Ben..

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events