Production Ready Macros for SAS Application Developers File Reference

Get an additional access token using a refresh token. More...

Go to the source code of this file.

Detailed Description

Before an access token can be obtained, a refresh token is required For that, check out the mv_tokenauth macro.


  prep work - register client, get refresh token, save it for later use ;
data _null_;
file "~/refresh.token";
put "&refresh_token";

  now do the things n stuff;
data _null_;
  infile "~/refresh.token";
  call symputx('refresh_token',_infile_);

A great article for explaining all these steps is available here:

inds=A dataset containing client_id and client_secret
outds=A dataset containing access_token and refresh_token
client_id=The client name (alternative to inds)
client_secret=client secret (alternative to inds)
grant_type=valid values are "password" or "authorization_code" (unquoted). The default is authorization_code.
user=If grant_type=password then provide the username here
pass=If grant_type=password then provide the password here
access_token_var=The global macro variable to contain the access token
refresh_token_var=The global macro variable containing the refresh token
VIYA V.03.04
Allan Bowe, source:

SAS Macros

Definition in file