Getting Started

Lynkwell's API is a machine-to-machine server side API. The API is organized around REST and has predictable resource-oriented URLs. Developers are expected to send requests to Lynkwell from their backend resources.

This API is organized around standard REST and HTTP with predictable resource-oriented URLs. This allows you to use any HTTP client regardless of programming language to send requests to Lynkwell from your backend resources.

Making API Requests Directly from the Client

Making requests directly from a client application exposes your Client ID and Client Secret, which can lead to your account being compromised. DO NOT expose your client ID or Client Secret to any client-side application.

Basic Authentication

  1. Log into Network Manager and go to the API Clients section of the developers page. Lynkwell API Clients

  2. Choose your existing API client or create a new one by typing in a "Client Name" and clicking on the Create API Client button. step2-2

  3. Copy the Client ID and Client Secret and store them in a safe place. You will need them to request a token. step3

  4. Use your Client ID and Client Secret to request an authorization from Lynkwell's OAuth2 client credentials token route (https://lynkwell-prod.us.auth0.com/oauth/token). This request will return an access_token that can be used to authorize future API requests.

    Example Request:

    curl --request POST \
    --url https://lynkwell-prod.us.auth0.com/oauth/token \
    --header 'content-type: application/json' \
    --data `{
        "client_id":"${YOUR_CLIENT_ID}",
        "client_secret":"${YOUR_CLIENT_SECRET}",
        "audience":"https://api.lynkwell.com",
        "grant_type":"client_credentials"
    }`

    Example Response:

    {
      "type": "object",
      "required": ["access_token", "token_type", "expires_in", "scope"],
      "properties": {
        "access_token": {
          "type": "string"
        },
        "token_type": {
          "type": "string",
          "const": "Bearer"
        },
        "expires_in": {
          "description": "The number of seconds until the token expires",
          "type": "integer"
        },
        "scope": {
          "description": "The scopes associated with the token",
          "type": "string"
        }
      }
    }
  5. Include the access_token in the Authorization header of your API requests in the format Authorization: Bearer ACCESS_TOKEN.

    Example Request:

    curl --request GET \
    --url "https://api.lynkwell.com/v1/assets" \
    --header "content-type: application/json" \
    --header "Authorization: Bearer ACCESS_TOKEN"

Was this page helpful?