Auth Token is not getting refreshed due to which API is getting failed with error 401
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Auth Token is not getting refreshed due to which API is getting failed with error 401
Hi @richie
Auth Token is not getting refreshed automatically though I have ticked the checbox in settings too
and due to which I have to intervene manually and update the token
Please refer the screenshot for the same
- Labels:
-
CommunityNews
-
ReadyAPITeam
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey @Jainsoumya
It's been several years since I did anything wiht OAuth and that was when you had to use a script to do the auto refresh, so I don't think I'll be much help here.
HOWEVER - the token refresh options appear pretty straightforward.
Rather than use the "no expiration" radio button - have you played around with the custom option?
Cheers,
Rich
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@richie while trying to automate the script for oauth token I am getting an error :
The following script failed: ko.dataFor(document.getElementById('i0116')).usernameTextbox.value('john.smith@hotmail.com'); document.getElementById('idSIButton9').click()
Error: Uncaught TypeError: Cannot read property 'usernameTextbox' of undefined]
For reference I am using this doc :https://support.smartbear.com/readyapi/docs/requests/auth/types/oauth2/automate/azure-sample.html
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I havent got an OAuth project to try and play with it, but if you've played with the options (and lets face it, its not overly complicated functionality) im leaning towards raising a support ticket to see if Smartbear can sort it for you as youve exhausted all options.
The ReadyAPI support ticket page is here -->> https://support.smartbear.com/readyapi/message/
Cheers,
Rich
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Jainsoumya ,
we are using a Submitlistener Script to get new tokens. With the options it worked not for us too.
Kind Regards, Michael
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you mkrausem and richie
Hi @Jainsoumya, please review the recent suggestions from the Community, if none of them help, I recommend opening a support ticket - this issue might require a deeper investigation in this case. Thank you!
Sonya Mihaljova
Community and Education Specialist
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@mkrausem Hi
I have tried the script
but I am getting an error Uncaught TypeError: Cannot read property 'usernameTextbox' of undefined]
Login page is of microsoft , so I am not sure what m missing
I have raised the incident for the same waiting for reply
ko.dataFor(document.getElementById('i0116')).usernameTextbox.value= ("soumya.jain@strategy-compass.com");
document.getElementById('idSIButton9').click();
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey @Jainsoumya
When you get a response from SmartBear regarding the support ticket - would you mind publishing the results please?
Refreshing the OAuth token has always been problematic, so I'd be interested to see a solution.
I do know someone put a script together that actually worked and posted the solution - I'll have a search and see if I can find it.
that's all I got for now I'm afraid!
Cheers,
Rich
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
