Authentication
In order to communicate with our API, you must first generate an access token. In our desktop app, head to the settings, "Access tokens" section, and create a new access token.
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 are 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 above command returns JSON structured like this:
{
"message": "pong"
}
If you see this response, authentication works as expected 🎉