Authentication
In order to communicate with our API, you must first generate an access token – in our desktop app, visit Settings → Access tokens.
info
Our API expects an access token to be included in all API requests in Authorization header.
To verify that the integration works correctly and you’re able to call our APIs, test the connection by hitting our /v1/ping endpoint. Here is an example in Ruby programming language:
ping.rb
require 'rest-client'
RestClient.get('https://api.lunatask.app/v1/ping', { Authorization: "bearer #{access_token}" })
The request returns JSON structured like this:
{
"message": "pong"
}
If you see this response, authentication works as expected 🎉