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

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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