Want to Get AccessToken BasedOn Refresh Token

Hi, i am trying to get accesstoken after expiring accesstoken with 24hrs/1 day validaity. So for this i opted the API : Get Access Token with Refresh Token : oauth2/default/v1/token, So when i invoke this endpoint i am getting the error as : {
“error”: “consent_required”,
“error_description”: “The following scopes require user consent: [offline_access].”
}

Provided the refresh token, scope, grant_tye, redirect_uri, clientid and client secret for Basic Auth.

Anyone can help on the above ?

Could you let us know which OAuth flow you are using (like authorization code flow) or what is the grant_type you are passing ?

using the following details.

OAuth flow : authorization code flow,
grant_type : refresh_token,
scope : openid email profile offline_access

Please let me know if any info needed.

Any update on above ?

could anyone give reply on the issue.

Hi @balamurali.k! Looks like this scope requires user consent. Do you have this enabled under Security>API>Scopes>Offline_Access?

3 Likes

@balamurali.k Hi,
please check if you have access to user “consent” section.
https://developer.okta.com/docs/guides/request-user-consent/require-consent/