Using OAUTH2 bearer token to access Okta API's


#1

Hi,

I have gone through the documentation for accessing Okta API endpoints to fetch user, application and groups data. However in all request samples I see authorization happening with api_token only (-H “Authorization: SSWS ${api_token}”).

When I tried replacing the authorization header with a bearer token generated from (auth2/default/v1/token), I keep getting an invalid session response.

Does Okta support accessing REST endpoints using bearer tokens? If yes, please let me know how to achieve this.


#2

Hi @Pranav, the REST endpoints do not yet support Bearer token authentication. For the time being please continue using api tokens.


#3

Hi @robertjd, Thank you for quick response.