HTTP Request using 3rd party API Key -Need help

Below is the Powewrshell that I use to get JSON back from my API call to a 3rd party app. I tried everything to configure it using n8n HTTP Request using Headers and setting up a Key Credential, it gives me URL invalid. Can not figure it out, in powershell works fine. What goes where in the HTTP Request from the powershell API call?

Powershell (masked values for security reasons):

$cloudUrl = “test.fake.com
$rackAPIKey = “oooooooo8888p/wMAAA===”
$apiEndpoint = “api/123/Desktop/SV_test?groupId=All%20Systems” #The endpoint to call.

Set up the request headers to use the API key.

$requestHeaders = @{
Host=$cloudUrl
‘rack-api-key’=$rackAPIKey
}

Call a rack API Endpoint

$apiResponse = Invoke-WebRequest -Method Get -Uri “https://$cloudUrl/$apiEndpoint” -Headers $requestHeaders -UseBasicParsing

It should work if your workflow is set up like this…

And your credential is set up like this:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.