Hello,
As mentionned in this paper : https://support.sas.com/resources/papers/proceedings19/3232-2019.pdf
BASIC authentication is (as the name suggests) very basic. The user name and password
are sent in an Authorization header encoded in Base64. For all intents and purposes, this
means that the password is being sent across the wire in clear text. BASIC authentication is
not secure unless HTTPS is being used.
I am using the a base64 encoder (https://www.base64encode.net/) to get a basic encoded credential key
by passing first the client_id : Client secret.
From that point, I would like to execute a Proc Http to get a bearer token, but I still getting a 400 error, i.e. bad request.
Here's my SAS code.
options set=SSLREQCERT="allow";
filename resp temp;
proc http url="https://ca1.qualtrics.com/API/oauth2/token/"
method="POST"
auth_basic
in="{""grant_type"":""client_credentials"",
""scope"":""read:survey_responses""}"
out=resp;
headers "Content-Type"="application/json"
"Authorization"="Basic MmFhMDhjNDZiMTBi...";
run;
Please note that the key value after "Authorization"="Basic
have been cut for safety purpose.
Could it be possible to help me with that SAS code
Have you tried the answer posted here?
Solved: How to use PROC HTTP with OAUTH to get an access token from a remote s... - SAS Support Comm...
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.