This document will help you get started using the Larky Nudge API. We use Postman to illustrate the API concepts.
OAuth
We use OAuth2 to secure access to the Nudge API. Specifically, we implement the “client credentials” pathway. Larky will assign you a client ID and a client Secret. Using those credentials, you will request a temporary Access token to access the Nudge API.
Getting a client ID and client secret
Larky will assign you a unique client ID and a client secret upon request. Those credentials should be kept secret! Please get in touch with support@larky.com to request your credentials.
Getting an access token
You must obtain a temporary access token once you have your client ID and secret.
Issue an HTTPS POST command to the oauth2/token URL. Include your client ID, client secret, and the grant type of “client_credentials” in the POST body. If you prefer, the client ID and client secret can instead be included in the POST header as a Basic Auth header.
The expected result code is 200, with a payload containing an access token and an expiration time in minutes. The access token type is always Bearer.
Please keep track of the token and its expiry time. When it is about to expire, refresh it by issuing another POST to the oauth2/token endpoint.
Calling the Nudge API
To call the Nudge API, you embed your access token in the call’s header as a “Bearer” token and provide input data for the endpoint you are calling.
Simple example
Here is a simple example calling /GetOrganization to retrieve basic organization information
Documentation extract:
Call
Call /GetOrganization with a Larky supplied API key
Authorization: Use the access token we previously retrieved as a “Bearer Token”
Output: Basic information about the Organization
API Reference
Full API documentation is available here.
Comments
0 comments
Article is closed for comments.