
DavenC.15920 (Customer) asked a question.
When I call the /oauth2/v1/userinfo endpoint I am receiving an invalid_token response.
I have created an application as described here
https://developer.okta.com/docs/guides/implement-auth-code/setup-app/
I have exchanged the code for a token as described here
https://developer.okta.com/docs/guides/implement-auth-code/exchange-code-token/
When I make a call for user info as described here I recieve an invalid token response
https://developer.okta.com/docs/reference/api/oidc/*userinfo
Additional Info
Error
WWW-Authenticate: Bearer authorization_uri="http://dev-xxx.okta.com/oauth2/v1/authorize", realm="http://dev-xxx.okta.com", scope="openid", error="invalid_token", error_description="The access token is invalid.", resource="/oauth2/v1/userinfo"
Access Code URL
Token Request
curl --request POST \
--url https://dev-xxx.okta.com/oauth2/default/v1/token \
--header 'accept: application/json' \
--header 'authorization: Basic {AuthToken}' \
--header 'content-type: application/x-www-form-urlencoded' \
--data 'grant_type=authorization_code&redirect_uri=[URL]&code=[code]'
UserInfo Request
curl -v -X POST \
-H "Authorization: Bearer {accessToken}" \
"https://dev-xxx.okta.com/oauth2/v1/userinfo"
User Setup
I have created and am testing with one user who is assigned to the everyone group

Please refer System Log from Okta Admin console for more details about Invalid_token error. Also try to first Introspect Token before you call oauth2/v1/userinfo (https://developer.okta.com/docs/reference/api/oidc/#introspect)