Headers
To ensure the security and proper functioning of requests to the Reserhub Data Lake API, you must include two mandatory headers in all your requests: Authorization and Origin.
These headers allow us to validate both your identity and the source of the request.
Authorization
The Authorization header is mandatory and must follow the format:
Authorization: Bearer <your-token>For example, if you were provided with the token test_token123abc, the header should be:
Authorization: Bearer test_token123abcOrigin
The Origin header is essential for our security validation, as it allows us to verify that requests come from an authorized source.
The value of this header must correspond to the URLs you previously provided, following these rules:
-
For the development environment (sandbox):
- Only requests whose
Originmatches the registered development URLs will be accepted - Example:
Origin: https://[your-domain].dev.com
- Only requests whose
-
For the production environment:
- Only requests whose
Originmatches the registered production URLs will be accepted - Example:
Origin: https://[your-domain].com
- Only requests whose
Important: Requests will be rejected if you try to access the production URL with a development Origin or vice versa.
Best Practices
To maintain clean and secure code, we recommend storing your token in an environment variable called Bearer_Token. For example:
Bearer_Token = "Bearer <Token>"This practice not only protects your token from accidental exposure but also facilitates consistency with the examples provided in our documentation and in the Postman guide, so if you ever experience any issues, support can be provided more efficiently.