Skip to main content

Authentication

The EasyWeek API requires authentication to ensure that only authorized systems can access data and perform actions. Follow these steps to authenticate your API requests.

Include the Authentication Key and Your Workspace

To authenticate your API requests, you need to include the authentication key in the Authorization header. The key should be in the format of a Bearer token. Additionally, you must include your workspace slug in the Workspace header.

Use cURL for Authentication (Example)

You can use cURL, a command-line tool, to make authenticated API requests. Here's an example of how to include your authentication key in a cURL request:

curl -i -X GET \
https://my.easyweek.io/api/public/v2/ping \
-H 'Authorization: Bearer <YOUR_SECRET>' \
-H 'Workspace: <YOUR_WORKSPACE>'

Make sure to replace <YOUR_SECRET> with your actual authentication key and <YOUR_WORKSPACE> with the relevant workspace slug.

Verifying Authentication

Upon successful authentication, the API response should have a status code of 200, indicating a successful request. Additionally, the response text should be pong.