Authenticating requests
Once you have received your API credentials, you can authenticate with the Recranet Booking API using an API key or Basic Auth. Below is an example of how to set up authentication in cURL and Postman:
cURL example
API key
curl -X GET "https://app.recranet.com/api/accommodations/" \
-H "Accept: application/json" \
-H "X-Api-Key: YOUR_API_KEY"Basic Auth
curl -X GET "https://app.recranet.com/api/accommodations/" \
-H "Accept: application/json" \
-u "username:password"Postman example
- Create a new request.
- Set the request type to GET, POST, PUT, or DELETE depending on the action you want to perform.
- Set the Accept header with the value application/json.
- Enter the API URL (e.g., https://app.recranet.com/api/accommodations/).
- Navigate to the Authorization tab.
- Select the correct Auth Type based on the credentials provided by Recranet Support:
API key
- Select "API key" from the dropdown menu.
- Enter "X-Api-Key" in the "Key" field.
- Enter your API key in the "Value" field.
- Ensure "Add to" is set to "Header".
- Send the request and review the response.
Basic Auth
- Select "Basic Auth" from the dropdown menu.
- Enter the username and password provided by Recranet Support.
- Send the request and review the response.
With these steps completed, you are ready to start using the Recranet Booking API. For any questions or further assistance, please contact [email protected].
Updated 16 days ago
What’s Next