Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

SetOAuthToken – PB Docs 2019 – PowerBuilder Library

SetOAuthToken – PB Docs 2019

SetOAuthToken

PowerScript function

Description

Sets the OAuth 2.0 token string to the HTTP request header which
will be sent to the server in the following interface: Submit, SendGetRequest, SendPostRequest, SendDeleteRequest, SendPatchRequest, SendPutRequest, Retrieve, and RetrieveOne. If a token has been set in
the HTTP request header, it will replace the original token.

Applies to

RESTClient objects

Syntax

Argument

Description

objectname

The name of the RESTClient object in which you want to set
the OAuth 2.0 access token.

token

A string value specifying the OAuth 2.0 access
token.

Return value

Integer. Returns 1 if the function succeeds and a negative value if
an error occurs. If any argument’s value is null, the method returns
null.

1 — Success

-1 — General error

Example

The following code example adds a new data record and submits it to
the server.

See also

GetOAuthToken


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x