<?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: You are being redirected in Network Platform API</title>
    <link>https://community.cisco.com/t5/network-platform-api/you-are-being-redirected/m-p/5411771#M2072</link>
    <description>&lt;P&gt;Yes, the redirects will cause issues.&lt;/P&gt;&lt;P&gt;For example, I've included scripts in my JS code to handle it.&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/dexterlabora/meraki-splash-gp/blob/master/request-meraki.js" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/dexterlabora/meraki-splash-gp/blob/master/request-meraki.js&lt;/A&gt;&lt;/P&gt;&lt;P&gt;meraki-service (in development)&lt;/P&gt;&lt;P&gt;&lt;A href="https://dexterlabora.github.io/meraki-service/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://dexterlabora.github.io/meraki-service/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;(sorry no PHP example)&lt;/P&gt;</description>
    <pubDate>Tue, 05 Jun 2018 14:15:32 GMT</pubDate>
    <dc:creator>DexterLabora</dc:creator>
    <dc:date>2018-06-05T14:15:32Z</dc:date>
    <item>
      <title>You are being redirected</title>
      <link>https://community.cisco.com/t5/network-platform-api/you-are-being-redirected/m-p/5411769#M2070</link>
      <description>&lt;P&gt;Probably a stupid question :-D.&lt;/P&gt;&lt;P&gt;I want to get all the clients on the network. My script is working but I get the sentence "You are being redirected" instead of an array with the data. If I click on the link behind "Redirected" I get all the data. But I need this info for my script. Any help would be great.&lt;BR /&gt;&lt;BR /&gt;My code:&lt;BR /&gt;&amp;lt;?php&lt;BR /&gt;&lt;BR /&gt;$request = new HttpRequest();&lt;BR /&gt;$request-&amp;gt;setUrl('&lt;A href="https://api.meraki.com/api/v0/devices/SERIALNUMBER/clients" target="_blank" rel="nofollow noopener noreferrer"&gt;https://api.meraki.com/api/v0/devices/SERIALNUMBER/clients&lt;/A&gt;');&lt;BR /&gt;$request-&amp;gt;setMethod(HTTP_METH_GET);&lt;BR /&gt;&lt;BR /&gt;$request-&amp;gt;setQueryData(array(&lt;BR /&gt;  'timespan' =&amp;gt; '84000'&lt;BR /&gt;));&lt;BR /&gt;&lt;BR /&gt;$request-&amp;gt;setHeaders(array(&lt;BR /&gt;  'postman-token' =&amp;gt; '7187e3f4-f792-c5f6-da1e-73e51253767d',&lt;BR /&gt;  'cache-control' =&amp;gt; 'no-cache',&lt;BR /&gt;  'x-cisco-meraki-api-key' =&amp;gt; 'api key'&lt;BR /&gt;));&lt;BR /&gt;&lt;BR /&gt;try {&lt;BR /&gt;  $response = $request-&amp;gt;send();&lt;BR /&gt;&lt;BR /&gt;  echo $response-&amp;gt;getBody();&lt;BR /&gt;} catch (HttpException $ex) {&lt;BR /&gt;  echo $ex;&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2018 08:31:19 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/you-are-being-redirected/m-p/5411769#M2070</guid>
      <dc:creator>jonas@complit.be</dc:creator>
      <dc:date>2018-06-04T08:31:19Z</dc:date>
    </item>
    <item>
      <title>Re: You are being redirected</title>
      <link>https://community.cisco.com/t5/network-platform-api/you-are-being-redirected/m-p/5411770#M2071</link>
      <description>If you can't followed the redirect then you need to make an initial request to get the URL for your main request.</description>
      <pubDate>Mon, 04 Jun 2018 10:13:11 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/you-are-being-redirected/m-p/5411770#M2071</guid>
      <dc:creator>Philip D'Ath</dc:creator>
      <dc:date>2018-06-04T10:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: You are being redirected</title>
      <link>https://community.cisco.com/t5/network-platform-api/you-are-being-redirected/m-p/5411771#M2072</link>
      <description>&lt;P&gt;Yes, the redirects will cause issues.&lt;/P&gt;&lt;P&gt;For example, I've included scripts in my JS code to handle it.&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/dexterlabora/meraki-splash-gp/blob/master/request-meraki.js" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/dexterlabora/meraki-splash-gp/blob/master/request-meraki.js&lt;/A&gt;&lt;/P&gt;&lt;P&gt;meraki-service (in development)&lt;/P&gt;&lt;P&gt;&lt;A href="https://dexterlabora.github.io/meraki-service/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://dexterlabora.github.io/meraki-service/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;(sorry no PHP example)&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 14:15:32 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/you-are-being-redirected/m-p/5411771#M2072</guid>
      <dc:creator>DexterLabora</dc:creator>
      <dc:date>2018-06-05T14:15:32Z</dc:date>
    </item>
  </channel>
</rss>

