<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Problem using PROC HTTP with authentication in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Problem-using-PROC-HTTP-with-authentication/m-p/777410#M81155</link>
    <description>Thanks, Chris! Actually it didn't work… Do you have any suggestions about possible reasons? It would be helpful for me to address the problem here.&lt;BR /&gt;&lt;BR /&gt;Thanks again!</description>
    <pubDate>Fri, 29 Oct 2021 20:32:37 GMT</pubDate>
    <dc:creator>Felipe_bortolo</dc:creator>
    <dc:date>2021-10-29T20:32:37Z</dc:date>
    <item>
      <title>Problem using PROC HTTP with authentication</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-using-PROC-HTTP-with-authentication/m-p/777395#M81153</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I’m trying to use a REST service with basic authentication (no proxy server involved) to ger information in json format using PROC HTTP.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I can’t connect successfully to the web server using the procedure. I’ve already verified the procedure’s official documentation and I read the guide RESTfull web services for beginners, but I can’t find any syntax errors (I’ve already tried different ways).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Someone could please help me, indicating what could be wrong or how I could get successfully connected using basic authentication? I’m using Guide 8.2 version.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here’s an example of the code I’m trying to submit:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;filename TESTE temp encoding='utf-8';

proc http
	url="https://............."
	method="GET"
	auth_basic
	WEBPASSWORD="XXXXXXXXXXXX"
	WEBUSERNAME="nome_usuario"
	out=TESTE
	TIMEOUT=30
	ct="application/json";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 19:32:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-using-PROC-HTTP-with-authentication/m-p/777395#M81153</guid>
      <dc:creator>Felipe_bortolo</dc:creator>
      <dc:date>2021-10-29T19:32:36Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using PROC HTTP with authentication</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-using-PROC-HTTP-with-authentication/m-p/777398#M81154</link>
      <description>&lt;P&gt;Have you tested that you can work with PROC HTTP to reach websites in your environment? Try this code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;filename resp temp;
 
/* Neat service from Open Notify project */
proc http 
 url="http://api.open-notify.org/astros.json"
 method= "GET"
 out=resp;
run;
 
/* Assign a JSON library to the HTTP response */
libname space JSON fileref=resp;
 
/* Print result, dropping automatic ordinal metadata */
title "Who is in space right now? (as of &amp;amp;sysdate)";
proc print data=space.people (drop=ordinal:);
run;&lt;/LI-CODE&gt;
&lt;P&gt;If that works, make sure the REST service you're using can use basic authentication (user and password), instead of a more elaborate token-based authentication.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Ask-the-Expert/How-Do-You-Use-SAS-to-Access-Data-and-APIs-From-the-Web-Q-amp-A/ta-p/699613" target="_self"&gt;This webinar and links might help&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 19:45:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-using-PROC-HTTP-with-authentication/m-p/777398#M81154</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2021-10-29T19:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using PROC HTTP with authentication</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-using-PROC-HTTP-with-authentication/m-p/777410#M81155</link>
      <description>Thanks, Chris! Actually it didn't work… Do you have any suggestions about possible reasons? It would be helpful for me to address the problem here.&lt;BR /&gt;&lt;BR /&gt;Thanks again!</description>
      <pubDate>Fri, 29 Oct 2021 20:32:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-using-PROC-HTTP-with-authentication/m-p/777410#M81155</guid>
      <dc:creator>Felipe_bortolo</dc:creator>
      <dc:date>2021-10-29T20:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using PROC HTTP with authentication</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-using-PROC-HTTP-with-authentication/m-p/777414#M81156</link>
      <description>&lt;P&gt;It's possible you have a proxy gateway that you need to account for. &lt;A href="https://blogs.sas.com/content/sasdummy/2018/01/23/check-json-and-http/" target="_self"&gt;See some tips here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 20:43:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-using-PROC-HTTP-with-authentication/m-p/777414#M81156</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2021-10-29T20:43:07Z</dc:date>
    </item>
  </channel>
</rss>

