Credentials

Before moving forward, you should have credentials to access Datasaur API. Datasaur API uses the Oauth 2.0 protocol for authentication and authorization. Datasaur uses the Client Credentials Grant.

You can generate the credentials by logging in to your account and select Generate OAuth Credentials.

Base URL: https://datasaur.ai/api/oauth/token

User Flow

  1. Obtain OAuth 2.0 credentials by requesting them from us. We will provide the credentials (client_id and client_secret).

  2. Obtain access tokens by using client_id and client_secret .

    curl --location --request POST 'https://datasaur.ai/api/oauth/token' \
    --header 'Content-Type: application/x-www-form-urlencoded' \
    --data-urlencode 'client_id=client_id' \
    --data-urlencode 'client_secret=client_secret' \
    --data-urlencode 'grant_type=client_credentials'
  3. Use the access token to access the Datasaur API.

Response

{
    "access_token": "618f4778263fdcf5e9345e5aeaad05ac54ef2818",
    "token_type": "bearer",
    "expires_in": 3600
}

Now that you have the access token, we'll provide an example of how to create a new project via the API.

Generate OAuth Credentials Menu

You can generate OAuth credentials by your own! After logging in, you can go to profile menu at the upper right corner and select Generate OAuth credentials.

You can keep the Client ID and Client secret of each member. If you regenerate the OAuth Credentials, the old one will be invalidated.

__📌 Note: this feature only applies on Growth and Enterprise. Please contact us to upgrade your account on support@datasaur.ai.

Last updated