From the MorphL Dashboard, you can generate API credentials (key and secret).

Once you have retrieved the API key & secret, you can make a request to authenticate. In case of success, the API will return a JSON response containing a JWT (JSON Web Token) that will be used for authorizing requests to other API endpoints.

Params Headers Success Error
api_key & api_secret - {token:***} {error:"Error message"}

Generating API credentials

  1. Log in to your MorphL account.
  2. From the left side menu, go to API.
  3. Press the Generate credentials button.
    Dashboard - Generate API credentials
  4. Copy your API key and secret to a safe place.

Quick start

You can interact with the API from the command line. First install the curl tool.

$ brew install curl

Make request using curl:

$ API_KEY=pk_***************
$ API_SECRET=sk_***************

$ curl \
  -X POST \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "api_key=$API_KEY&api_secret=$API_SECRET"

Example response:

$ {"token":"eyJ0eXAiOi3erdf4iOiJIUzI1NiJ9.eyJpc3MiOiJtb3..."}