I am attempting to follow the instructions for implementing the Client Credentials flow. I am able to get an access token, but when I attempt to validate it using the introspect
endpoint, I always get {"active": false}
. Here is exactly what I did:
- Using Postman, I send a POST request to https://dev-xxxxxxxx.okta.com/oauth2/default/v1/token. I used basic auth with my client ID and client secret. The request body, encoded in
x-www-form-urlencoded
, containsgrant_type=client_credentials
and my custom scope. I get back a JSON response containing an access token that expires in 3600 seconds. - Using Postman, I send another POST request to https://dev-xxxxxxxx.okta.com/oauth2/default/v1/introspect. I again use basic auth with my client ID and client secret. For the request body, I again use
x-www-form-urlencoded
. I include two parameters:token
, where the content is the copy/pasted value of theaccess_token
key from the previous request, andtoken_type_hint=access_token
. I get back{"active": false}
.
I repeated this sequence several times, making triply sure that I was not accidentally copying the quotes or anything else erroneous. I also tried omitting the type hint.
What am I doing wrong?
Thank you,
David