We are trying to get new refresh_token and access_token using existing refresh_token. Every time it returns the same refresh_token but less validity left. After sometime refresh_token will be not valid anymore.
Can someone suggest how to generate new refresh_token with more validity.
Note :- We have scheduled job which runs every 12hrs to generate new refresh_token and access_token using existing refresh_token
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Yep - that's true. The Analytics API does not support offline_access scope yet. So your app would not be able to refresh access tokens for more than 14 days and would need the user to log in again.
Views
Replies
Total Likes
Hi @Kumar1
Did you create your project recently (to be exact: did you add the OAuth credential recently to your project)?
If not, I'd recommend deleting the current OAuth credential from your project and re-adding the API to get a new OAuth credential. We have made a host of improvements to refresh tokens in the new credential which avoids problems like the one you are seeing.
Let me know if this still does not work for you.
Happy to help
Thanks,
Manik
Views
Replies
Total Likes
Hi Manik,
I created the new project and used newly generated OAuth credentials to fetch fresh set of access_token and refresh_token but it is still repeatedly returning the same refresh_token .
Views
Replies
Total Likes
@Kumar1 I checked with our internal team - that is not a problem - we reuse the same refresh token for 7 days (as it expires in 14 days). Post 7 days, our OAuth servers will return you a new refresh token. So the effect to watch out for is not whether refresh tokens are same or not, but whether your app is able to refresh access tokens indefinitely.
Also, one thing probably worth verifying is whether your API has the offline access scope available. To do this, go to your project on the Developer Console, on the sidenav pick the OAuth credential you are using and then click on the scopes tab to see the list of scopes added to your client id.
Let me know if this still does not work for you.
Happy to help.
Hi @tmj ,
I verified the API and the offline access scope is not there.
Could you please suggest how can I add offline scope to my API ?
Views
Replies
Total Likes
@Kumar1 the offline_access scope depends on whether the API Supports it or not. Which API are you working with?
Views
Replies
Total Likes
@tmj We are using Adobe Analytics API's and I don't think it support offline_scope.
Views
Replies
Total Likes
Yep - that's true. The Analytics API does not support offline_access scope yet. So your app would not be able to refresh access tokens for more than 14 days and would need the user to log in again.
Views
Replies
Total Likes
@tmj Is there any way to handle this scenario ? Currently we have to manually regenerate the token from postman and feed it into our application after every 14 days.
Views
Replies
Total Likes
If it is an application you folks own, do you know if you can you the Service Account (JWT) credential to call the same APIs instead of the OAuth credential?
I'd suggest trying that approach or reaching out to the Analytics Team here: https://experienceleaguecommunities.adobe.com/t5/adobe-analytics/ct-p/adobe-analytics-community
Views
Replies
Total Likes
Hi @tmj ,
I have raise this issue with Adobe support team and they are looking into this.
Meanwhile I will try to implement the (JWT) credential.
Thank you for you help
Views
Replies
Total Likes
Is this still the case? (API 1.4) If so, does the Analytics API 2.0 support this? We need to automate refreshes without user intervention.
Views
Replies
Total Likes
Views
Likes
Replies