You can translate the question and the replies:

Using an API key to authenticate with an API over HTTP

Hello, I'm trying to create a JSON data source using the HTTP Route. I need to provide an API key for authentication, but I don't know where to put it. The curl request below captures the request I'm trying to make in Denodo. ``` curl 'https://subdomain.kualibuild.com/app/api/v0/graphql' -H 'Content-Type: application/json' -H 'Authorization: Bearer apikey' --data-binary '{"query":"query { apps { id name }}","variables":{}}' --compressed ``` How can I go about making the above request in Denodo?
user
14-12-2023 17:59:35 -0500
code

2 Answers

Hi, To authenticate with an API key in a JSON data source using HTTP, I would set Authentication to Off and add an HTTP Header with name "Authorization" and value "Bearer apikey". For more information, please refer to [JSON Sources](https://community.denodo.com/docs/html/browse/latest/en/vdp/administration/creating_data_sources_and_base_views/json_sources/json_sources) and [HTTP Path](https://community.denodo.com/docs/html/browse/latest/en/vdp/administration/creating_data_sources_and_base_views/path_types_in_virtual_dataport/http_path) in the User Manuals. Also note that you'll need to escape the `{` and `}` characters with a preceding `\` in the post body. Hope this helps!
Denodo Team
19-12-2023 18:54:18 -0500
code
That did the trick, thank you! I suggest you add this to the documentation for [HTTP Path](https://community.denodo.com/docs/html/browse/latest/en/vdp/administration/creating_data_sources_and_base_views/path_types_in_virtual_dataport/http_path).
user
19-12-2023 19:13:45 -0500
You must sign in to add an answer. If you do not have an account, you can register here