SoloDB Documentation version 0.1-DEV Help

How to obtain oAuth2 token

For server to server purposes, you can use the oAuth2 token to authenticate with the API. This is a short guide on how to obtain the oAuth2 token.

oAuth2 request

The oAuth2 request is a POST request to the following URL:

POST https://demo.solodb.net/oauth Accept: application/json Content-Type: application/json { "grant_type": "password", "redirect_uri": "https://localhost:3000", "username": "username", "password": "password", "client_id": "__CLIENT_ID__", "client_secret": "__SECRET__" }

The server will return the following response:

{ "access_token": "eyJ0eXAiOi....", "expires_in": 3600, "token_type": "bearer", "scope": "User.Read", "refresh_token": "eed8d2b6034..." }

oAuth2 refresh token

The oAuth2 refresh token is a POST request to the following URL:

POST https://demo.solodb.net/oauth Accept: application/json { "grant_type": "refresh_token", "redirect_uri": "https://localhost:3000", "refresh_token": "c10002c63f9b22ac28cf1df873b93660ea430903", "client_id": "__CLIENT_ID__", "client_secret": "__SECRET__" }

The server will respond with a new access token and a new refresh token

Note that in your case solodb.net should be replaced with the URL of your own SoloDB installation

Last modified: 05 April 2025