Build your API call

Before you get started you need to ensure that you have completed the following steps:

  1. Get user credentials : You must contact our support team to obtain user credentials. Once the email is sent, the support team will send you the credentials: username and password. The username will be your email address.

  2. Get your API Key :

  • Once obtained the credentials, call the Login method entering the credentials in JSON format to obtain the standard api key that is temporarily valid 24 hour

HTTP Request : POST kingslanding/login

BODY: {
     "username": "[email protected]",
     "password": "g035871AA"
      }
curl -i --location --request POST 'https://staging-aws.messangi.me/kingslanding/login' --header 'Content-Type: application/json' --data-raw '{
"username": "[email protected]",
"password": "g035871AA"
}'

The response contains in the authorization header the Standard Api Key.

HTTP/2 200
server: nginx/1.17.10
date: Mon, 31 May 2021 06:15:57 GMT
content-length: 0
vary: Origin
vary: Access-Control-Request-Method
vary: Access-Control-Request-Headers
authorization: Bearer <YOUR_API_KEY>
access-control-expose-headers: Authorization
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
cache-control: no-cache, no-store, max-age=0, must-revalidate
pragma: no-cache
expires: 0
strict-transport-security: max-age=15724800; includeSubDomains
x-frame-options: DENY
  • If you want to get a custom Api Key, go to API Keys for more information about creating and configuring Custom Api Keys.

    Remember, you need to provide the Standard API Key to create a new Custom API Key with an indefinite or definite period of time. In general, you should not keep tokens longer than required.

    The Standard API Key and Custom API Key allow the user to access routes, services, and resources that are permitted with that token.

  • The differences between Standard API Key and Custom API Key are the following:

    The Standard API Key is a token provided by the login method with an expiration time of 1 day.

    The Custom API Key is a token that does not expire, although it will remain valid as long as you do not delete the token unless you set it with a defined expiration time.

  1. Make sure you have cURL installed on your machine.

📘

NOTE

On Windows, use a Bash shell to make cURL calls.