- Dave Contessi
- PowerBuilder
- Thursday, 12 December 2024 08:30 PM UTC
Hi, I hope you can help us with a perplexing issue we are seeing. No known cause has been found yet.
We are experiencing intermittent errors when getting OAuth access token in RESTClient - it works most of the time but fails for a few users daily
e.g. GetOAuthToken() returns -1 (General error)
Are you getting reports from Developers experiencing this same issue and a possible solution or workaround ?
Thanks
Environment
App built on PB 2022 b1900 running on Citrix (Windows Server 2019 Standard 1809)
Sample PowerScript
n_restclient gn_restclient
gn_restclient = Create n_restclient
gn_restclient.SecureProtocol=0
TokenRequest itr_TokenRequest
itr_TokenRequest.ClientId = ls_ClientId_decoded
itr_TokenRequest.ClientSecret = ls_ClientSecret_decoded
itr_TokenRequest.Scope = ls_Scope
itr_TokenRequest.TokenLocation = ls_TokenLocation
itr_TokenRequest.GrantType = "client_credentials"
itr_TokenRequest.Method = "POST"
Integer li_Return
String is_Access_Token
li_Return = gn_restclient.GetOAuthToken(itr_TokenRequest, REF is_Access_Token)
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.