44.19 OAUTH_SET_TOKEN Procedure

This procedure sets the OAuth access token to be used in subsequent MAKE_REST_REQUEST calls. This procedure can be used to set a token which has been obtained by other means than with OAUTH_AUTHENTICATE (for instance, custom code).

Syntax

PROCEDURE OAUTH_SET_TOKEN(
    p_token   IN VARCHAR2,
    p_expires IN DATE DEFAULT NULL );

Parameters

Table 44-12 OAUTH_SET_TOKEN Procedure Parameters

Parameter Description

p_token

The OAuth access token to be used by MAKE_REST_REQUEST calls.

p_expires

Optional: The token expiry date; NULL means: No expiration date.

Example

 begin
     apex_web_service.oauth_set_token(
         p_token =>   '{oauth access token}'
     );
 end;