1. Edward Chan
  2. PowerBuilder
  3. Monday, 4 July 2022 16:46 PM UTC

Dear Sir, 

I need to migrate the following code to powerbuilder, but I didn't find the corresponding parameters.

The following is the http request to get the access token:

POST https://open.12345.com/auth/token
Content-Type: application/json
"authorize_type": "silent",
"client_id": "your-clientId",
"client_secret": "your-clientSecret",
"grant_id": "your-ktdId",
"refresh": false


On Powerbuilder:

TokenRequest lnv_TokenRequest

lnv_TokenRequest.Tokenlocation = "https://open.youzanyun.com/auth/token"
lnv_TokenRequest.Method = "POST"
lnv_TokenRequest.clientid = "12345"
lnv_TokenRequest.ClientSecret = "12345"


Please help. 

Thanks in advance.



Miguel Leeuwe Accepted Answer Pending Moderation
  1. Monday, 4 July 2022 17:02 PM UTC
  2. PowerBuilder
  3. # 1

Not sure if this might help you but there's like 60 posts on Access tokens:



There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Tuesday, 5 July 2022 09:30 AM UTC
  2. PowerBuilder
  3. # 2


I don't know if is an issue but in your original post you are setting content-type. Maybe you should add:

lnv_TokenRequest.setheader("Content-Type", "application/json")

For other options I wonder if you need to use AppendParam function. TokenRequest doesn't support setting body so I believe you cannot send json... Have you tried to implement this using RestClient?


There are no comments made yet.
  • Page :
  • 1

There are no replies made for this question yet.
However, you are not allowed to reply to this question.