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

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

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