Prospero currently supports only one authentication method: personal access & refresh tokens, obtained through email/password authentication.
A valid access token is required on every request to the Prospero API. When your access token expires, you can use your refresh token to obtain a new access token.
Service Tokens & OAuth2 Coming Soon
We intend to support simple service tokens (for private integrations & scripts) as well as full OAuth2 authentication (for third-party applications) in the future.
Authentication Flow
-
Obtain initial access & refresh tokens
Send a
POSTrequest to/auth/loginwith your email and password. The response will contain your access token and refresh token in theSet-Cookieheader. Here's an example of how to extract them with thecurlbuilt-in cookie jar:CodeStore your access token and refresh token securely. Anyone who obtains these tokens will be able to act as you while interacting with the Prospero API.
-
Use your access token to access the Prospero API
Include your access token on all subsequent requests to the Prospero API in the
Cookieheader:CodeYour access token is valid for 1 hour. If you attempt to access the Prospero API with an expired token, you'll receive a
401 Unauthorizedresponse. -
Refresh your access token
When your access token expires, you can use your refresh token to obtain a new access token. Send a
GETrequest to/auth/refreshwith your refresh token in theCookieheader. Extract the new access token from theSet-Cookieheader:CodeYour refresh token is valid for 7 days. When your refresh token expires, you'll receive a
400 Unable to verify refresh tokenresponse. You'll need to use/auth/loginagain to obtain a new refresh token to continue accessing the Prospero API.