⏱ Quickstart

The SpatiaFi API uses OAuth 2.0 for authentication. This means that you will need to generate an access token to use the API. This guide will walk you through the steps to generate an access token and use it to make your first API call.

One of the security features of OAuth 2.0 is that access tokens are short-lived and can be revoked at any time. This means that if your access token is compromised, you can simply request a new one and the old one will no longer work. This may be different from other services you've used, where you might have a single API key that never expires.


If your token expires and you get an "Access Denied" error, simply generate a new access token

For more advanced use cases, including authenticating from a program, see the Authentication guide.

Generate an Access Token

Let's get an access token by logging in with your username and password. In the panel below, expand the "Security" section and enter your username and password.

Then hit send!


If you see a response with an access token, congratulations! You've successfully authenticated to the SpatiaFi API 🎉

Make an API Call

Now that we have an Access Token we can use them to authenticate to the API. Let's make a call to the /info endpoint to get information about the ce-wildfire-risk-static-us-and-canada-v3.0 dataset:
  1. In the panel below, expand the "Security" section and ensure that "Security scheme" is set to OAuth2PasswordBearer, "Access Token Type" is set to Bearer, and enter your access token from above.
  2. In the "Parameters" section, set item_id to ce-wildfire-risk-static-us-and-canada-v3.0.

Then hit send!

Please generate an Access Token above.

If you see a response with item information, congratulations! You've successfully used the SpatiaFi API 🎉

Next, follow along with the Intro Tutorial to learn how enrich your own data with SpatiaFi climate data, or check out the API Reference to learn more about the SpatiaFi API.

Copyright © SpatiaFi/Climate Engine 2023. All right reserved.