This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Powershell & API hooks failing

Trying to use powershell to pull pull information from samanage but I keep getting an error when just testing the authentication part documented here

Below is the code I am running with my token removed.

$token = 'TOKEN' 
$apiver = 'Accept: application/vnd.samanage.v2.1+json' 
$apiurl = 'https://api.samanage.com/' 

curl -H 'X-Samanage-Authorization: Bearer $token' -H $apiver -H 'Content-Type: application/json' -X GET $apiurl + incidents.json

 And then here is the error I get:

image.png

EDIT: I did some google searching for the error and everything i found basically said to do it differently but none of it was related to SWSD.