BookmarkSubscribeRSS Feed
alepage
Barite | Level 11

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

 

1 REPLY 1

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

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!

Register Now

Creating Custom Steps in SAS Studio

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 702 views
  • 0 likes
  • 2 in conversation