Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 1.04 KB

API.md

File metadata and controls

31 lines (21 loc) · 1.04 KB

Spatially API

Once you have created an account on Spatially Labs you should be able to see your API code & key. Your API key is secret. Make sure to store it in a secure place.

Generate an access token

In order to gain access to Spatially Labs services, you must first generate an access token, this is done by making an HTTP call to our API gateway with your API code and key.

Below is an example:

Request

POST https://api.spatially.com/gateway/client

Headers:
  Content-Type: application/json

Body:
  { "code": "YOUR_APPLICATION_CODE", "key": "YOUR_APPLICATION_KEY" }

Response

{
  "token":
    "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXJ2aWNlcyI6WyJzcGF0aWFsZGIiLCJhZHMvc2NpZW5jZS9hdGEiXSwiYXV0aCI6ImFub24iLCJrZXkiOiI5MGEyOWI5OC1kYzVkLTQzNTktODkwMi1mZTVmZjZiNGIzN2IiLCJhdWQiOiJzZXJ2aWNlcy5nYXRld2F5LkF1dGhvcml6ZVVzZXIiLCJleHAiOjE1MjI5NjU3OTMsImlzcyI6InNlcnZpY2VzLmdhdGV3YXkuQXV0aG9yaXplQ2xpZW50Iiwic3ViIjoic3BhdGlhbGx5ZGIifQ.8iSWx7WH3Ejy-kz9sSlNzoVWg-PtnZfaPmWS0g8KPgI",
  "config": {}
}