OAuth Service | Near Space Labs Docs

OAuth Service (1.0.1)

Download OpenAPI specification: Download

Authentication is required for all endpoints and is implemented using OAuth 2.0 with the Client Credentials flow. Users must obtain valid credentials (client ID and secret) to access the service. The authentication system issues Bearer tokens that are valid for 60 minutes, after which they must be refreshed. All requests must include a valid Bearer token in the Authorization header. Failed authentication attempts or expired tokens will result in 401 (Unauthorized) responses, while insufficient permissions will trigger 403 (Forbidden) responses.

/paths/1oauth1token/post Retrieve OAuth Token

Request Body schema: application/json required

Client credentials for authentication

audience
required
string
The target audience for the token " https://api.nearspacelabs.com"
client_id
required
string
The client ID for authentication
client_secret
required
string
The client secret for authentication
grant_type
required
string
Grant type for the token request "client_credentials"

Responses

200

Successful retrieval of access token

401

Unauthorized - Invalid client ID or secret

post/oauth/token

https://api.nearspacelabs.net/oauth/token

Request samples

Content type

application/json

Copy

`{"audience": "https://api.nearspacelabs.com",

"client_id": "your_client_id",

"client_secret": "your_client_secret",

"grant_type": "client_credentials" }`

Response samples

Content type

application/json

Copy Expand all Collapse all

[{"access_token": "eyJhbGciO..",\ \ "expires_in": 3600,\ \ "token_type": "Bearer"\ \ }]