Intervals API Authentication

The Intervals API uses token-based authentication. Every Intervals user has a unique 11-character alphanumeric token that looks something like this: ebcwdxoygfk. Each person must manually enable his or her API token by going to the My Account -> API Access under the Options tab. There, they will be able to view, generate, revoke, and regenerate their token. Users cannot view other users' tokens, and this information is not accessible through the API.

Making Authenticated API Requests

Once the user has given you his or her authentication token, make your request in the same format as HTTP Basic Auth. This user token will serve as the username (the password can be filled with an arbitrary string like "X"). An example is below.

Assume your user token is ebcwdxoygfk and your arbitrary password string is X. The combined string would be ebcwdxoygfk:X (base64 encoded as ZWJjd2R4b3lnZms6WA== for the Authorization header). To get a timer list, your request would look something like this:

GET /timer/ HTTP/1.0
Host: api.myintervals.com
Accept: application/xml
Authorization: Basic ZWJjd2R4b3lnZms6WA==

Or using cURL:

curl -H 'Accept: application/json' -u ebcwdxoygfk:X https://api.myintervals.com/timer/