How to get the scope of access token using golang sdk

I created an access token using okta console and I use that token to fetch information in my golang app using okta go sdk(okta-sdk-golang/v2/okta). What I want to know is that given I have a token what permission that token is assigned? This could be in any form, for example, list of apis token can access, list of resources token can access.

I would prefer if it can be done using go sdk but if there is any other method kindly let me know as well.

And I can of course know the permissions from okta console but I would like to know them inside my golang application.

The only thing you can directly see within the Token (without sending it to Okta as authentication) is the [scp claim](OpenID Connect & OAuth 2.0 API | Okta Developer) that will list all the scopes you requested, but this will not indicate the Admin Role(s) associated with that token.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.