BookmarkSubscribeRSS Feed
vijayagoggi
Calcite | Level 5
I have tested API in postman then i got data.But same API i have tested in SAS EG with below code i am getting "<html><head><title>Error</title></head><body>Invalid Username/Password !</body></html>" this error. Please help me to resolve this issue
 
filename indarea "D:\D DRIVE\D drive Data\indarea.json";
filename indarea1 "D:\D DRIVE\D drive Data\indarea1.json";
 
proc http url="******"
AUTH_BASIC
in='{"primaryKeys":["21102" "03-Jul-2023" "03-Jul-2023"]}
method="POST"
ct='application/json'
WEBUSERNAME= "****"
WEBPASSWORD="***"
out=indarea;
run;
4 REPLIES 4
Kurt_Bremser
Super User

Your IN= option misses a closing single quote.

Whenever you get an ERROR or WARNING, or have other issues with your code, post the complete (all code and messages) log of the failing step by copy/pasting it into a window opened with this button:

Bildschirmfoto 2020-04-07 um 08.32.59.jpg

vijayagoggi
Calcite | Level 5

Actually i have given single quotation also but getting  this error "<html><head><title>Error</title></head><body>Invalid Username/Password !</body></html>" 

vijayagoggi
Calcite | Level 5
filename indarea "D:\D DRIVE\D drive Data\indarea.json";
proc http url="******"
AUTH_BASIC
in='{"primaryKeys":["21102" "03-Jul-2023" "03-Jul-2023"]}'
method="POST"
ct='application/json'
WEBUSERNAME= "***"
WEBPASSWORD="***"
out=indarea;
run;
AlanC
Barite | Level 11

If your webusername or password contains an '&' it may be resolving as a macro variable. Try putting them values in single quotes. 

https://github.com/savian-net

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 4 replies
  • 511 views
  • 0 likes
  • 3 in conversation