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

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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
  • 767 views
  • 0 likes
  • 2 in conversation