Integrations api key
rutger
Posted: 12.09.2022 13:39
Modified: 25.06.2025 20:46
In the configuration for an integration you can add an optional API key but it is not clear how it is send in the request? For my integration the 3th party requires that the api key is set inside the headers like so: `Authorization: ApiKey <API_KEY>`.
aranet-techsupport
Posted: 13.09.2022 05:57
Hello,
API key is transmitted in the header in following way:
rutger
Posted: 29.12.2022 15:20
Hi, we want the ability to set the `Authorization` header so that can auth with our backend. Is this posible?
aranet-techsupport
Posted: 02.01.2023 09:18
Hi rutger,
To be able to fetch a JSON API with JavaScript on the browser the API must support a so called preflight request, that responds with the allowed origins, methods and headers. A modern browser initiates this preflight call to ask the API server if the requester (client side javascript within a servers page) is allowed to request for the called resources. Therefore an JSON API must respond to an OPTIONS call with the following headers:
- access-control-allow-headers
- access-control-allow-methods
- access-control-allow-origin
rutger
Posted: 02.01.2023 09:31
Hi, I think that there is a little missunderstanding here. What we want is to add our API key to the `Authorization` header inside the intetegrations settings. Right now all we can configure is an url and an api key but we want the api key inside the `Authorization` header and not the`X-API-KEY` header.
aranet-techsupport
Posted: 02.01.2023 10:19
Hi,
Here is an example how to request data from aranet Cloud
Request sensor data:
What are you seeking to change or adjust?
rutger
Posted: 02.01.2023 10:20
We are not requesting data, we have setup an integration to receive data from aranet cloud
guest
Posted: 04.01.2023 12:57
We currently have setup this integration in aranet cloud: https://forum.aranet.com/site/assets/files/tmp_uploads/1769068729.png
We use API keys to auth HTTP requests on our side, these keys have to be set in the `Authorization` header. To my understanding when I fill in the this API key field it is set to the `X-API-KEY` header. How could we make it that the API key is set to the correct header?
ernests
Posted: 04.01.2023 14:03
You can include the Authorization header as a URL parameter in a similar way as any other header. Here is an example of how you can include the Authorization header as a URL parameter
https://api.example.com/endpoint?Authorization=Bearer YOUR_BEARER_TOKEN
rutger
Posted: 04.01.2023 14:06
Thanks for the sugestion but we do not want to include secrets as url parameters. Sadly it has to be the `Authorization` header.
ernests
Posted: 04.01.2023 14:09
so in generral feature request would be have ability to add to push integration option to include customer header with custom value ?
by this you would have possibility to add own header with value
rutger
Posted: 04.01.2023 14:10
Yes, that would solve our problem
rutger
Posted: 04.01.2023 14:16
Would this by any means be posible to implement?
ernests
Posted: 04.01.2023 14:39
This request is included to feature requests for further Aranet Cloud development.
Please contact support@aranet.com so we can discuss some details for this feature request.
rutger
Posted: 04.01.2023 14:50
Thanks, you will hear from me shortly
You have to log in to reply.