<?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 Cannot Access API with Access Key in Prisma Cloud Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/cannot-access-api-with-access-key/m-p/324684#M241</link>
    <description>&lt;DIV&gt;I am trying to get the API to work so we can properly deploy host defenders on our non-container hosts.&amp;nbsp; I cannot authenticate to the API and I am at wit's end.&amp;nbsp; I supply the access key id and secret key value and get back the following:&lt;/DIV&gt;
&lt;DIV&gt;{"err":"unauthorized access key 123...}&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;This doesn't make sense to me, i've tried with both access keys created using sys admin&amp;nbsp;role and cloud provisioning role, nothing works.&amp;nbsp; Please let me know if you know what might be wrong... are keys not readily usable upon creation?&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;This is the curl command I am sending (with private things redacted):&lt;/DIV&gt;
&lt;DIV&gt;curl -H "Content-Type: application/json" \&lt;BR /&gt;-d '{"username":"123...","password":"abc...."}' \&lt;BR /&gt;&lt;A href="https://us-west1.cloud.twistlock.com/us-3-123456789/api/v1/authenticate" target="_blank" rel="noopener"&gt;https://us-west1.cloud.twistlock.com/us-3-123456789/api/v1/authenticate&lt;/A&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 07 Feb 2022 23:23:17 GMT</pubDate>
    <dc:creator>BCerier</dc:creator>
    <dc:date>2022-02-07T23:23:17Z</dc:date>
    <item>
      <title>Cannot Access API with Access Key</title>
      <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/cannot-access-api-with-access-key/m-p/324684#M241</link>
      <description>&lt;DIV&gt;I am trying to get the API to work so we can properly deploy host defenders on our non-container hosts.&amp;nbsp; I cannot authenticate to the API and I am at wit's end.&amp;nbsp; I supply the access key id and secret key value and get back the following:&lt;/DIV&gt;
&lt;DIV&gt;{"err":"unauthorized access key 123...}&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;This doesn't make sense to me, i've tried with both access keys created using sys admin&amp;nbsp;role and cloud provisioning role, nothing works.&amp;nbsp; Please let me know if you know what might be wrong... are keys not readily usable upon creation?&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;This is the curl command I am sending (with private things redacted):&lt;/DIV&gt;
&lt;DIV&gt;curl -H "Content-Type: application/json" \&lt;BR /&gt;-d '{"username":"123...","password":"abc...."}' \&lt;BR /&gt;&lt;A href="https://us-west1.cloud.twistlock.com/us-3-123456789/api/v1/authenticate" target="_blank" rel="noopener"&gt;https://us-west1.cloud.twistlock.com/us-3-123456789/api/v1/authenticate&lt;/A&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 07 Feb 2022 23:23:17 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/cannot-access-api-with-access-key/m-p/324684#M241</guid>
      <dc:creator>BCerier</dc:creator>
      <dc:date>2022-02-07T23:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Access API with Access Key</title>
      <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/cannot-access-api-with-access-key/m-p/324775#M242</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/138330"&gt;@BCerier&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also had some problems with this when I started automating Prisma.&lt;BR /&gt;Here you can find the API documentation:&amp;nbsp;&lt;A href="https://api.docs.prismacloud.io/reference#try-the-apis" target="_blank"&gt;https://api.docs.prismacloud.io/reference#try-the-apis&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I see the following problems in your request:&lt;/P&gt;&lt;P&gt;1. The API URI is not correct, you can find the correct one on the link above&lt;/P&gt;&lt;P&gt;2. You have to use URI/login not authenticate&lt;/P&gt;&lt;P&gt;3. You need to place a POST request: curl -X POST&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps you.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2020 13:57:28 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/cannot-access-api-with-access-key/m-p/324775#M242</guid>
      <dc:creator>SMeury</dc:creator>
      <dc:date>2020-04-24T13:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Access API with Access Key</title>
      <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/cannot-access-api-with-access-key/m-p/324778#M243</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/131249"&gt;@SMeury&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for your response.&amp;nbsp; Maybe we are thinking of two different apis? I am aware of that API endpoint, but that is for Prisma Cloud (Redlock) and I am specifically looking for API calls to the compute section (what used to be Twistlock).&amp;nbsp; I need to be able to authenticate with twistlock to get a token to then download an install script to deploy single host defenders when machines start up.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was just able to figure it out however, my command that I was trying was correct, however the access key i had did not have a role assigned to it within the Prisma Cloud-&amp;gt;Compute-&amp;gt;Manage-&amp;gt;Authentication section.&amp;nbsp; After updating the role in there the access key worked as expected in the curl command that I originally posted.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2020 14:19:46 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/cannot-access-api-with-access-key/m-p/324778#M243</guid>
      <dc:creator>BCerier</dc:creator>
      <dc:date>2020-04-24T14:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Access API with Access Key</title>
      <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/cannot-access-api-with-access-key/m-p/330825#M270</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;It looks like a piece of the string is missing. Please try "&lt;A href="https://us-west1.cloud.twistlock.com/us-3-123456789/api/v1/authenticate" target="_blank" rel="nofollow noopener noreferrer noopener noreferrer noopener noreferrer noopener noreferrer noopener noreferrer noopener noreferrer"&gt;https://us-west1.cloud.twistlock.com/us-3-123456789/api/v1/authenticate&lt;/A&gt;-client"&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2020 12:49:46 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/cannot-access-api-with-access-key/m-p/330825#M270</guid>
      <dc:creator>PBowden</dc:creator>
      <dc:date>2020-06-01T12:49:46Z</dc:date>
    </item>
  </channel>
</rss>

