<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
System Status
Announcements
Announcements
Search
Search
Select Language
0D5KZ00001ZNPa70AHOkta Classic EngineAuthenticationAnswered2025-11-28T18:03:22.000Z2025-11-03T08:10:00.000Z2025-11-28T18:03:22.000Z

RakeshS.25709 (Customer) asked a question.

Okta Access Token Not Generated

Hi Team,

I followed the steps mentioned in doc - https://developer.okta.com/docs/guides/implement-oauth-for-okta-serviceapp/main/

 

Section Create and sign the JWT -> In this, For testing purposes, use this tool to generate and sign a JWT. This tool link is not working. I got work around with API call, I am able to generate the JWT token.

 

Section Get an access token -> I am using JWT token to get access token but not getting the token. Getting 'Bad Request' in post main when executing via online curl runner (https://reqbin.com/curl) then getting 'invalid_client'.

 

As per doc in this section, no client id required, could you please help me with the solutions?

 

I am trying to get token api rest api and use in subsequent rest api call. I need to validate the token, if valid then proceed else return error.

I will be happy if you can help me with API gateway integration doc along with above query.

 

Curl Command:

curl --location --request POST 'https://integrator-******.okta.com/oauth2/default/v1/token' \

--header 'Accept: application/json' \

--header 'Content-Type: application/x-www-form-urlencoded' \

--data-urlencode 'grant_type=client_credentials' \

--data-urlencode 'scope=okta.users.read' \

--data-urlencode 'client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer' 

--data-urlencode 'client_assertion=eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJodHRwczovL2ludGVncmF0b3ItMTc2MTI4OS5va3RhLmNvbS9vYXV0aDIvZGVmYXVsdC92MS90b2tlbiIsImlhdCI6MTc2MjE1NTc4MiwiZXhwIjoxNzYyMTU2MDgyLCJpc3MiOiIwb2F3djFyZ3I3TWFsOTJqWTY5NyIsInN1YiI6IjBvYXd2MXJncjdNYWw5MmpZNjk3IiwianRpIjoiMmI5YjY2YzQtODY0MS00MzNlLWExMmEtZGNiZjgwYTU3NzMwIn0.WAcjmVa8z1rYK_E5Feqw10fYkBd59chG1AxIVxyQ37MaMo31I6D-l6ux0IT9Oowa3HWcoLCUfCCdEd-Om9OlUiZnoADI_7diDGAaonCBCqPOI6_VKSsZVBLwcP1mFQhltnQTKkMcM6Mmy9-675llJWXXKvwCrVumOi0HzzzIRB6nKzac7HsxY5Apibv9xCgpkdyXpRG3PDroyww5rGymuKtGtmB59ha-EiXEiVJcXQ4PcCdEAf8tyxxV2gTkIRbeDDinBlV-MYWSmktPsNpH_fYMbwyy1zqPF_67UQq_yh11vSV_xWrkFJq9Vfzz8rP0H2k2s9L40OdeE4XvyQs61A' \

--data-urlencode 'client_id=0oawv1rgr7Mal92jY697'

 

 

 

 


This question is closed.
Loading
Okta Access Token Not Generated
Okta Support Agent (Beta)

Terms of Service

Hello! I'm the Okta Support Agent (Beta), your go-to resource for questions about Okta products. Please remember for your security and privacy, do not share any Personally Identifiable Information (PII) such as passwords, IP addresses, or other details with me.

Okta Privacy Policy and Terms of Service apply