Unable to get access token from refresh token

@IntegrationSupport ,
I am using this API “/v2/auth/generate/access-token” to get the access token from refresh token.
But now its giving the following error. I have been using it regularly but getting this error today only.
screenshot

@IntegrationSupport,
any update on this?

@IntegrationSupport,
any update on this?

@pranab Please assist here.

Help needed regarding the same in V3 Apis as well

@IntegrationSupport

Hi @viewzen @abha_AID_integration could you please share the page where you get this endpoint to refresh your token. Also I believe you need to send grantType with value of “refresh_token” when you are trying to generate access token.

@integrationSupport,
This is link to swagger API.
https://app.swaggerhub.com/apis-docs/abdm.abha/abha-service/1.0#/Authentication/generateAccessTokenUsingPOST

please give the endpoint to use for refreshing the token in V3 API after profile login.

@IntegrationSupport,
please update on this issue, i have shared the required API link also.

@viewzen @abha_AID_integration

There is no need of calling this API as “accessToken” expiry is 6 hrs. and “refreshToken” expiry is 30 min only.

CC: @IntegrationSupport @pranab

No. The ABHA Profile login tokens have the following expiry times

access_token: 1800
refres_token: 1296000

@viewzen kindly check once again, the access token expires after 6 hours.

“expiresIn”: 21600,
“refreshExpiresIn”: 1800

@IntegrationSupport,
This is the expiry time for tokens.

“jwtResponse”: {
“token”: “eyJhbGciOiJSUzUxMiJ9.eyJzdWIiOiI5MS0xMzQ3LTg3MzQtNDQxMiIsInN5c3RlbSI6IkFCSEEtTiIsIm1vYmlsZSI6IjczNTEwNzcwNjkiLCJleHAiOjE2OTg4MzI3MDUsImhlYWx0aElkTnVtYmVyIjoiOTEtMTM0Ny04NzM0LTQ0MTIiLCJpYXQiOjE2OTg4MzA5MDV9.mnRJt_VuYUf5lh2wHTV76Pbr7I8nSb4s80GY7mzxDK2uaAQswrC2mO9T7lLlgG6PLWtzDnPlyRCRpt4mX7vrB1PZy5475dnjHuTQkEW-JJkP6GvgvJ8PuWt–EIenrMDyXavZC8949ix8Zp5-lLG7DN3ske6M9cqOwQr4zrCzX313phFSAeYFCjYq82cY3u9qeM4bWHA6y9j4jU8vXeVIps-6Jryf99qKHMnZehk1QAG-jz_1FgpJi_gtbMxe-P6fKq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8I0kDSy-lY9rMBPRYPmUOONXxyyW7TeneZWIPd2HFUJQvUE-j7EFZlDl6qkvjFzZpyLCC02SL7xwjfZF2E3yjRH2qhjtVkocO4W8PNFlnGjNdafOc3UyPhMrP8IXBmEd3IVMb_zLBLi2daDhzY25Xq9Eu5pPt-QxKT9wUt2tUbyqekswadJBUPZhrZU3Z6CTdDVdAmM”,
“refreshExpiresIn”: 1296000
},

This one is for token got from clientId and clientSecret.

The one i shared is from the ABHA Profile Login (where user can see the ABHA card)

@IntegrationSupport
we are talking about the xtoken and refresh token that we get on aadhaar verification. using this xtoken we can get user’s info along with abha card.
we are using refresh token to get back the xtoken,once it expires as its expirty time in 1800 only.

@viewzen i don’t see any point of keeping the session alive after 30 minutes. If you want to show abha card to your users, you can download it in your storage and populate it as per your convenience. Could you please explain why do you want to keep the user logged in more than 30 minutes.

So this is by design

access_token: 1800
refresh_token: 1296000

The default implementation is for the user to be logged out after 30 mins. Understood. Thanks

@IntegrationSupport
after 30mins, we would require to generate the xtoken using refresh token.
That’s what i am saying, using refresh token we are unable to get the xtoken back.

@IntegrationSupport,
can you please share updates on this scenario?

@abha_AID_integration There is no need of getting token from refresh. Team has already mentioned everything in detail in the above thread. Please refer the trail. Closing this thread.