Waiting for engine...
Skip to main content

Legacy Data Integration API Reference (1.0.0) - OAuth2Connections

Toggle Pane

Download OpenAPI Specification: Download

OAuth2 Connections

Oauth2 process initiation. In order to support OAuth2 connections, In order to create new connections OAuth2 method, there's a need to create OAuth2 request to the provider, and then get the credentials by callback. The OAuth2 response will provide a credentials response that will be pass to the connection used an OAuth2 request in the credentials key. In order to determine the OAuth2 connections in Data Integration, find the oauth=true segmentation in the connection type.

OAuth2 New Credentials Requst

Initiating new OAuth2 process using Data Integration.
The request will provide an external link of auth_uri, that can be hit externally to the API (using any web browser). After the process will end in the provider side, Data Integration will get a callback request from the OAuth2 provider, and Data Integration will continue the process.
In order to get the OAuth2 process response, please continue to /oauth2/credentials.

  • scope: connection:edit
Authorizations:
BearerToken
Request Body schema: application/json

Ask for new OAuth2 process from Data Integration. The request includes a datasource_type in the body.

datasource_id
string

A valid datasource id in Data Integration.

validity_duration
integer [ 300 .. 43200 ]

The maximum time in seconds, the auth_uri and pull_id are valid. maximum = 12 hours (43200 seconds). An invalid time will return 429 (invalid param) status code.

Responses

Response Schema: application/json
auth_uri
string

The auth uri provided from the OAuth2 request.
In order to proceed in the OAuth2 process, please take the result, and open it in a web browser tab.

pull_id
string <token>

An hashed pull id that attach the auth uri and the correct response from the OAuth2 provider, in order to make sure the OAuth2 provider is the callback sender.

Request samples

Content type
application/json
{
  • "datasource_id": "fb",
  • "validity_duration": 300
}

Response samples

Content type
application/json
{}

OAuth2 Get Credentials

Getting the results of the Oauth2 process request.

  • scope: connection:edit
Authorizations:
BearerToken
Request Body schema: application/json
auth_uri
string

The auth uri provided from the OAuth2 request.
In order to proceed in the OAuth2 process, please take the result, and open it in a web browser tab.

pull_id
string <token>

An hashed pull id that attach the auth uri and the correct response from the OAuth2 provider, in order to make sure the OAuth2 provider is the callback sender.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "access_token": "Sksosa43ma904mnfnmaklasioewjns.akjsadiuewq",
  • "message": "Facebook Ads Connected Successfully",
  • "userId": 12847564034,
  • "status": 200,
  • "clientId": 194785639383273120
}