Authentication with Canopy

Hi,

I would like to authenticate with this api: API Reference. I have staging credentials but I am not sure which Authentication type I need to use in the n8n http request node.

I guess it might be Oauth1 but I am not sure.

Not sure what to put in the Authorization URL box?

Thank you!

Paul

Hey @paul2000, from the looks of it they simply expect you to send a x-api-key header:

In the credentials you were sent you should have API key. Canopy expects for the API key to be included in all requests to the API in a header that looks like the following:
x-api-key: ePYgsiGbWF5aAHBj0xT9Pa1k5li0NPMD25PQXbAC

So when using the HTTP Request node you should be able to pick Header Auth and configure the credentials like so:
image

Thanks @MutedJam, I have just tired that and the error is ‘User is not authorized to make this request’.

Later in the docs it says “You need to request an API token to make calls to the Canopy API. Canopy expects for the API token to be included in all requests to the API in a header that looks like the following:”

I think I need to request and send a token back as well.

Do you know how to do this please?

Thank you!