All endpoints under the Nebula Block API require user authentication to validate a user's identity and to know whose resources to access/create/alter/delete. For authentication, there are two options:
Regardless of the method, Bearer authentication is used and requires the following header be specified in an HTTP request:
Authorization: Bearer <token/key>
Access Tokens
Access tokens are obtained by logging in with a username and password via the login endpoint, and retrieving the jwtToken field in the response body. Once obtained, the following authorization header can be specified in each request:
NOTE: Access tokens expire after 2 hours, in which case you need to log in again to get a new access token
API Keys
API keys can also be used to authenticate requests. The benefit of using an API key is that there is no expiration date, so you can use them without authenticating often. To learn how to create and manage API keys, see the API Key Section Documentation. Once an API key is obtained, the following authorization header can be specified in each request: