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.
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 🎉/info endpoint to get information about the
- 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.
- In the "Parameters" section, set
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 🎉