OKTA API - Cannot retrieve active tokens for an Application

I have created few web applications and generated access tokens using client credentials and auth code grant types. But when I trying to fetch all the active tokens for a given application using the OKTA platform API as shown in [1] the API returns a empty array with response code 200 ?

[1] https://dev-123323-admin.okta.com/api/v1/apps/{appID}/tokens

Any Idea on how to get all the active token details for an given application ?

Hi @sam.sivayogam! Apologies for any confusion but this endpoint is specific to retrieving active refresh tokens; it is similar to Users | Okta Developer wherein you must also include the offline_access scope in your /authorize call to request for refresh tokens - Get a refresh token | Okta Developer. I will make a request to clarify this in our docs.

@sigama Thanks a lot for your response. Is there is any API which returns all the access tokens/OAuth tokens for a given Application or a user ?

@sam.sivayogam unfortunately we don’t have this endpoint yet. I do see it is a current feature request here https://ideas.okta.com/app/#/case/126968?section=requests - please vote on it!