Authenticating requests
Each request to the Emogg REST API must be accompanied by an Authorization header containing a valid token. This token authenticates the request, linking it to your account and ensuring secure access to your data.
If you still do not have a token see Authentication.
Once you have your access token, you must include it in the Authorization header of each HTTP request you make to the API. This token is a bearer token, and the Authorization header should be formatted as follows:
Authorization: Bearer YOUR_ACCESS_TOKEN
Replace YOUR_ACCESS_TOKEN with the actual token you were provided.
Example
Below is an example of how to make an authenticated request to the Emogg REST API using cURL. This example demonstrates how to retrieve the list of sessions associated with your account.
curl -X GET "https://api.emogg.com/v1/sessions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
In this example, replace YOUR_ACCESS_TOKEN with your actual access token. This request uses the GET method to query the /v1/sessions endpoint, which returns a list of your sessions. The crucial part for authentication is the Authorization header, which includes your bearer token.