docs

OAuth

OAuth is a standard for authentication which is used by many different services. It is a secure method of authentication which allows you to connect to a service without having to share your username and password.

Setup

To setup OAuth you will need to create an application in the service you are connecting to. This will give you a client id and a client secret. You will need to enter these into the Datasource > Config UI.

Authenticating with the service (data source)

When you click the authenticate button, you will be redirected to the service you are connecting to. You will be asked to login and then asked to grant access to the application you created in the setup step. Once you have granted access, you will be redirected back to the Datasource > Config UI.

The format of the URL will be similar to the following:

https://{domain.com}/oauth2/auth?response_type=code&client_id={clientId}&redirect_uri=https%3A%2F%2Fapp.sharpsync.net%2Fdatasources%2Foauth%2Fcallback&scope={requiredScopes}&state={someValue}

where the following values are replaced:

Troubleshooting

OAuth can return results which can be confusing for beginners. Below is a list of items which will help you troubleshoot your OAuth connection.

A result of invalid_request means that the client id or client secret is incorrect. You will need to check that you have entered the correct values into the Datasource > Config UI.

The error message returns a 400 Bad request with a body similar to:

{
    "error": "invalid_request"
}

A result of invalid_grant means that:

The error message returns a 400 Bad request with a body similar to:

{
    "error": "invalid_grant"
}