<?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 Proc Https get method (pass token, username &amp;amp; password) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Https-get-method-pass-token-username-amp-password/m-p/845885#M334416</link>
    <description>&lt;P&gt;How to pass token, username &amp;amp; password in proc https GET method?&lt;/P&gt;&lt;P&gt;For post method, i am able to pass&amp;nbsp;token, username &amp;amp; password and getting desired output. But for get method, it is giving error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone share me syntax for passing&amp;nbsp;token, username &amp;amp; password in proc https GET method ?&lt;/P&gt;</description>
    <pubDate>Wed, 23 Nov 2022 10:37:41 GMT</pubDate>
    <dc:creator>Amit2</dc:creator>
    <dc:date>2022-11-23T10:37:41Z</dc:date>
    <item>
      <title>Proc Https get method (pass token, username &amp; password)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Https-get-method-pass-token-username-amp-password/m-p/845885#M334416</link>
      <description>&lt;P&gt;How to pass token, username &amp;amp; password in proc https GET method?&lt;/P&gt;&lt;P&gt;For post method, i am able to pass&amp;nbsp;token, username &amp;amp; password and getting desired output. But for get method, it is giving error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone share me syntax for passing&amp;nbsp;token, username &amp;amp; password in proc https GET method ?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 10:37:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Https-get-method-pass-token-username-amp-password/m-p/845885#M334416</guid>
      <dc:creator>Amit2</dc:creator>
      <dc:date>2022-11-23T10:37:41Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Https get method (pass token, username &amp; password)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Https-get-method-pass-token-username-amp-password/m-p/845924#M334422</link>
      <description>&lt;P&gt;In a GET method the server isn't expecting a "payload" (what you would specify in the IN= option on PROC HTTP), so you would place the credentials argument on the URL or...if it's Basic Auth...on the WEBUSERNAME/WEBUSERPASSWORD options.&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;filename resp temp;
proc http
 url="https://httpbin.org?user=myusername&amp;amp;password=mypassword&amp;amp;token=ABC1234"
 method='GET'
 out=resp;
run;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sometimes, the API expects a token to be specified as part of the header, which you place in the HEADERS statement:&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;/* authtoken retrieved in previous step */
  filename resp temp;
  proc http
    url="https://httpbin.org/api/2.0/search?q=&amp;amp;query."  
    method="GET"
    out=resp
  ;
    headers 
      "Authorization"="Bearer &amp;amp;authtoken.";
 run;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This &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;webinar/article covers a lot of the basics&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 13:19:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Https-get-method-pass-token-username-amp-password/m-p/845924#M334422</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2022-11-23T13:19:41Z</dc:date>
    </item>
  </channel>
</rss>

