RecoupGet a Free AuditFree Audit

API REFERENCE

Authorize Connector

On this page
POST/api/connectors

Generate an OAuth authorization URL for connecting a third-party service. Redirect to the returned URL to complete the OAuth flow.

Authentication

x-api-key in header

bearerAuth bearer

Request

cURL
curl --request POST \
  --url 'https://api.recoupable.dev/api/connectors' \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "connector": "string"
}'

Request body required

Authorization request details

application/json

connectorstringrequired

The connector slug to authorize (e.g., 'googlesheets', 'tiktok', 'youtube', 'twitter', 'linkedin')

callback_urlstring

Optional custom callback URL after OAuth completion

format: uri

account_idstring

Optional account ID to connect a service for a different account (e.g., an artist or organization). Use this when connecting an artist's TikTok or other service. The authenticated account must have access. Omit to connect for your own account.

format: uuid

Responses

200Authorization URL generated successfully

application/json

successbooleanrequired
dataobjectrequired
Properties for data
connectorstringrequired

The connector slug being authorized

redirectUrlstringrequired

URL to redirect to for OAuth authorization

format: uri

400Bad request - invalid connector or parameters

application/json

errorintegerrequired

format: int32

messagestringrequired
401Unauthorized - invalid or missing API key

application/json

errorintegerrequired

format: int32

messagestringrequired
403Forbidden - no access to the specified account

application/json

errorintegerrequired

format: int32

messagestringrequired

Full specification

Download the OpenAPI file for complete schemas, constraints, and examples.

Download social.json
View operation source
json
{
  "security": [
    {
      "apiKeyAuth": []
    },
    {
      "bearerAuth": []
    }
  ],
  "description": "Generate an OAuth authorization URL for connecting a third-party service. Redirect to the returned URL to complete the OAuth flow.",
  "requestBody": {
    "description": "Authorization request details",
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/AuthorizeConnectorRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Authorization URL generated successfully",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/AuthorizeConnectorResponse"
          }
        }
      }
    },
    "400": {
      "description": "Bad request - invalid connector or parameters",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "401": {
      "description": "Unauthorized - invalid or missing API key",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden - no access to the specified account",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    }
  }
}