JoeD
May 22, 2019, 3:52pm
1
I’m trying to introspect a token, but getting a 404 when POSTING to:
https://dev-845984.oktapreview.com/oath2/default/v1/introspect
I have the client_id and token in the body, as x-www-form-urlencoded.
Specifically, the request returns the html for the Okta 404 page.
Based on https://developer.okta.com/docs/api/resources/oidc/#introspect , this looks like the correct endpoint to me. Can someone assist?
Fei
May 22, 2019, 3:56pm
2
JoeD
May 22, 2019, 3:56pm
3
Thank you. I can’t believe I missed that.
JoeD
May 22, 2019, 4:02pm
4
I’m now getting a ‘invalid_client’ and ‘No client credentials found’ error. I’ve tried including the client_id that I’ve copied from my SPA configuration in both the body as ‘client_id’ and the query params – neither seems to change it. Any ideas?
Fei
May 22, 2019, 9:26pm
5
The post request should be similar:
https://dev-845984.oktapreview.com/oauth2/default/v1/introspect?client_id={yourClientId}&token={yourAccessToken}&token_type_hint=access_token
You can try using postman to see if it returns the correct response. It is working for my oktapreview client.
dragos
April 6, 2020, 2:14am
7
Hi @Shubham6541
The error occurs when Accept
and Content-Type
headers are not added or have an invalid value. Here is a small cURL example for using the introspect endpoint.
curl --location --request POST 'https://dragos.okta.com/oauth2/default/v1/introspect' \
--header 'Accept: application/json' \
--header 'Authorization: Basic MG9hN...' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'token=TOKEN'
2 Likes
Thanx, Here I was missing Content-type: …
1 Like
system
Closed
January 24, 2024, 7:43pm
9
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.