<?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: REST API ErrorCode&amp;quot;:&amp;quot;PASWS006E&amp;quot;,&amp;quot;ErrorMessage&amp;quot;:&amp;quot;The session token is missing, invalid or expired.&amp;quot;} in PAM Self-Hosted Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/rest-api-errorcode-quot-quot-pasws006e-quot-quot-errormessage/m-p/1391733#M72042</link>
    <description>&lt;P&gt;We switched to the 1st gen logon API as you suggested and the behavior appears more stable in the customer environment. We are still stress testing and evaluating the behavior in the various environments , i sincerely appreciate your time and our QA will be further assessing, but things appear stable after the change&lt;/P&gt;</description>
    <pubDate>Mon, 18 Jul 2022 22:25:45 GMT</pubDate>
    <dc:creator>CyberArkAlumni</dc:creator>
    <dc:date>2022-07-18T22:25:45Z</dc:date>
    <item>
      <title>REST API ErrorCode":"PASWS006E","ErrorMessage":"The session token is missing, invalid or expired."}</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/rest-api-errorcode-quot-quot-pasws006e-quot-quot-errormessage/m-p/1391730#M72039</link>
      <description>&lt;P&gt;Hello CyberArk support, im a developer and we are trying to use the CyberArk REST API to do some automation; I am able to successfully authenticate (LOGON)  and get a session authorization token string. When I make subsequent REST request, we are passing the authorization token as a header  and we are getting the error "ErrorCode":"PASWS006E","ErrorMessage":"The session token is missing, invalid or expired."} ; This system appears to be behind a load balancer and I read another suggestion to attempt to pass both the Authorization and the cookies to the request which I tried however I am still getting the same error. I need your help to resolve the issue and I have the debug logs which I can also share to help us assure we have all set correctly, thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2022 17:51:56 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/rest-api-errorcode-quot-quot-pasws006e-quot-quot-errormessage/m-p/1391730#M72039</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2022-07-15T17:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: REST API ErrorCode":"PASWS006E","ErrorMessage":"The session token is missing, invalid or expired."}</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/rest-api-errorcode-quot-quot-pasws006e-quot-quot-errormessage/m-p/1391731#M72040</link>
      <description>&lt;P&gt;I did received this error some time back while working on REST API, Cyberark has 2 generation API so if you fetch the token using 1st gen API and store it in a Variable to consume in 2nd gen API commands it might give this error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For 1st gen you can use below commands to store the token and use it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$LogonUrl="https://&amp;lt;IIS_Server_Ip&amp;gt;/PasswordVault/WebServices/auth/Cyberark/CyberArkAuthenticationService.svc/Logon"&lt;/P&gt;&lt;P&gt;$Sessiontoken = Invoke-RestMethod -Method POST -Uri $LogonUrl -ContentType "application/json" -Body (ConvertTo-Json $logonbody)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;#Extract Token&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;$token = $sessionToken.psobject.properties.value&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;#Create Headers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;$Global:headers= @{Authorization = $token}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use $headers in other 1st gen API's as below:&lt;/P&gt;&lt;P&gt;$ResultSafeadd = Invoke-RestMethod -Method POST -Uri $Addsafeurl -ContentType "application/json" -Headers $headers -Body (ConvertTo-Json $addsafebody)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And for 2nd gen you can use below commands to store the token and use it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$LogonUrl= "https://&amp;lt;IIS_Server_Ip&amp;gt;/PasswordVault/API/auth/Cyberark/Logon"&lt;/P&gt;&lt;P&gt;$sessionToken = Invoke-RestMethod -Method POST -Uri $LogonUrl -ContentType "application/json" -Body (ConvertTo-Json $logonbody)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;#Create Headers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;$Global:headers= $sessionToken&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use $headers in other 2nd gen API's as below:&lt;/P&gt;&lt;P&gt;Invoke-RestMethod -Method POST -Uri $logoffurl -ContentType "application/json" -Headers $headers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this will help to resolve your issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Jul 2022 19:53:48 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/rest-api-errorcode-quot-quot-pasws006e-quot-quot-errormessage/m-p/1391731#M72040</guid>
      <dc:creator>saurbhargava</dc:creator>
      <dc:date>2022-07-16T19:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: REST API ErrorCode":"PASWS006E","ErrorMessage":"The session token is missing, invalid or expired."}</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/rest-api-errorcode-quot-quot-pasws006e-quot-quot-errormessage/m-p/1391732#M72041</link>
      <description>&lt;P&gt;Thanks &lt;A alt="https://community.cyberark.com/s/profile/0052J0000093cR3QAI" href="https://community.cyberark.com/s/profile/0052J0000093cR3QAI" target="_blank"&gt;saurbhargava&lt;/A&gt;&amp;nbsp; , we are using the 2nd gen API as shared on the documentation site for all the calls as it said it was recommended we also received suggestion to assure sticky session is enabled on the load bal, and we're revalidating that we are correctly passing the received "Cookie" variables in the request headers, will update if we are still blocked on the issue&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 16:14:47 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/rest-api-errorcode-quot-quot-pasws006e-quot-quot-errormessage/m-p/1391732#M72041</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2022-07-18T16:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: REST API ErrorCode":"PASWS006E","ErrorMessage":"The session token is missing, invalid or expired."}</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/rest-api-errorcode-quot-quot-pasws006e-quot-quot-errormessage/m-p/1391733#M72042</link>
      <description>&lt;P&gt;We switched to the 1st gen logon API as you suggested and the behavior appears more stable in the customer environment. We are still stress testing and evaluating the behavior in the various environments , i sincerely appreciate your time and our QA will be further assessing, but things appear stable after the change&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 22:25:45 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/rest-api-errorcode-quot-quot-pasws006e-quot-quot-errormessage/m-p/1391733#M72042</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2022-07-18T22:25:45Z</dc:date>
    </item>
  </channel>
</rss>

