How to access bitbucket user and email from forge function

I have added read:user:bitbucket scope to the manifest and when i am trying to

api.asUser().requestBitbucket(route`/2.0/user/emails`) 

I am receving a 401 error. Also have read:repository:bitbucket scope and i was able to read the repository details.

Am i missing something here ?

1 Like

The scopes should define what permissions you have for asApp(), not asUser(). The asUser() permissions are defined by the user requesting, I believe.