1. Dave Contessi
  2. PowerBuilder
  3. Thursday, 12 December 2024 20: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)

 



There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.