<?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 using PROC HTTP using SAS EG  to call API OAUTH2 in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-PROC-HTTP-using-SAS-EG-to-call-API-OAUTH2/m-p/667098#M36363</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have to call an API using OAUTH 2 method.&lt;/P&gt;&lt;P&gt;need to post the data and retrieve the result.&lt;/P&gt;&lt;P&gt;I have tried using postman using same authentication, token, and file and retrieve the result sucessfully, but why in SAS EG it doesnt have result ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is my code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;filename out1 temp ;&lt;BR /&gt;proc http&lt;BR /&gt;method="POST"&lt;BR /&gt;IN="WORK.SME_B_SCORE_300ROW"&lt;BR /&gt;out=out1&lt;BR /&gt;url="&lt;A href="http://10.17.16.190/predApi/v1.0/deployments/5ef3721a496d5c08b60c7f9d/predictions" target="_blank"&gt;http://10.17.16.190/predApi/v1.0/deployments/5ef3721a496d5c08b60c7f9d/predictions&lt;/A&gt;&lt;BR /&gt;headers "Authorization"="BEARER &amp;amp;token." ;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;infile out1 ;&lt;BR /&gt;input ;&lt;BR /&gt;put _INFILE_ ;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and this is the result : it doesnt error, but give blank file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: The infile OUT1 is:&lt;BR /&gt;Filename=C:\Users\un29813x\AppData\Local\Temp\SEG6480\SAS Temporary Files\_TD3844_NNAT0770049006_\#LN00060,&lt;BR /&gt;RECFM=V,LRECL=32767,File Size (bytes)=13,&lt;BR /&gt;Last Modified=06Jul2020:11:20:17,&lt;BR /&gt;Create Time=06Jul2020:11:20:17&lt;/P&gt;&lt;P&gt;2 The SAS System 08:38 Monday, July 6, 2020&lt;/P&gt;&lt;P&gt;&amp;lt;HTML&amp;gt;&amp;lt;/HTML&amp;gt;&lt;BR /&gt;NOTE: 1 record was read from the infile OUT1.&lt;BR /&gt;The minimum record length was 13.&lt;BR /&gt;The maximum record length was 13.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;</description>
    <pubDate>Mon, 06 Jul 2020 04:34:26 GMT</pubDate>
    <dc:creator>ulfa</dc:creator>
    <dc:date>2020-07-06T04:34:26Z</dc:date>
    <item>
      <title>using PROC HTTP using SAS EG  to call API OAUTH2</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-PROC-HTTP-using-SAS-EG-to-call-API-OAUTH2/m-p/667098#M36363</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have to call an API using OAUTH 2 method.&lt;/P&gt;&lt;P&gt;need to post the data and retrieve the result.&lt;/P&gt;&lt;P&gt;I have tried using postman using same authentication, token, and file and retrieve the result sucessfully, but why in SAS EG it doesnt have result ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is my code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;filename out1 temp ;&lt;BR /&gt;proc http&lt;BR /&gt;method="POST"&lt;BR /&gt;IN="WORK.SME_B_SCORE_300ROW"&lt;BR /&gt;out=out1&lt;BR /&gt;url="&lt;A href="http://10.17.16.190/predApi/v1.0/deployments/5ef3721a496d5c08b60c7f9d/predictions" target="_blank"&gt;http://10.17.16.190/predApi/v1.0/deployments/5ef3721a496d5c08b60c7f9d/predictions&lt;/A&gt;&lt;BR /&gt;headers "Authorization"="BEARER &amp;amp;token." ;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;infile out1 ;&lt;BR /&gt;input ;&lt;BR /&gt;put _INFILE_ ;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and this is the result : it doesnt error, but give blank file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: The infile OUT1 is:&lt;BR /&gt;Filename=C:\Users\un29813x\AppData\Local\Temp\SEG6480\SAS Temporary Files\_TD3844_NNAT0770049006_\#LN00060,&lt;BR /&gt;RECFM=V,LRECL=32767,File Size (bytes)=13,&lt;BR /&gt;Last Modified=06Jul2020:11:20:17,&lt;BR /&gt;Create Time=06Jul2020:11:20:17&lt;/P&gt;&lt;P&gt;2 The SAS System 08:38 Monday, July 6, 2020&lt;/P&gt;&lt;P&gt;&amp;lt;HTML&amp;gt;&amp;lt;/HTML&amp;gt;&lt;BR /&gt;NOTE: 1 record was read from the infile OUT1.&lt;BR /&gt;The minimum record length was 13.&lt;BR /&gt;The maximum record length was 13.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2020 04:34:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/using-PROC-HTTP-using-SAS-EG-to-call-API-OAUTH2/m-p/667098#M36363</guid>
      <dc:creator>ulfa</dc:creator>
      <dc:date>2020-07-06T04:34:26Z</dc:date>
    </item>
  </channel>
</rss>

