BookmarkSubscribeRSS Feed
CR-Horton
Fluorite | Level 6

Hi All,


I have found a lot of value in this community and appreciate all the help thus far.

I am needing to translate a CURL command that seems to be working fine in the command prompt. The command returns an access token. Instead of having to navigate out of SAS I would prefer to have this access token returned in a dataset that I can reference. Here is the CURL that works in the command prompt:

curl -X POST -d “client_id=XXXXXXXXXXXXXXXXXXXXXXXXX&client_secret=XXXXXXXXXXXXXXXXXXXXXX&grant_type=client_credentials” https://api.turn14.com/v1/token


I have tried this without any success:
filename resp temp;
proc http
url="https://api.turn14.com/v1/token"
webusername="XXXXXXXXXXXXXXXXXXXXXXXXX"
webpassword="XXXXXXXXXXXXXXXXXXXXXX"
out=resp
ct="application/x-www-form-urlencoded"
method="POST";
debug level=2;
headers "Accept"="application/json";
run;

Any thoughts on what I need to change to get this to work?

Thanks!

1 REPLY 1

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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