Oauth 2.0

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.

For now, you have to request the credentials to Datasaur team by sending an email to [email protected]

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.