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: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 481 views
  • 0 likes
  • 3 in conversation