POST
/
v1
/
teams
/
{teamId}
/
oauth
/
{provider}
/
start
TypeScript client
import { OctosparkClient } from '@octospark/sdk'

const client = new OctosparkClient({
  token: process.env.OCTOSPARK_TOKEN
})

const response = await client.social.startOAuth({
  teamId: process.env.OCTOSPARK_TEAM_ID ?? "teamId",
  provider: process.env.OCTOSPARK_PROVIDER ?? "provider",
  body: {},
})
{
  "authorizationUrl": "<string>",
  "state": "<string>",
  "flowId": "<string>",
  "expiresAt": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

teamId
string
required

Team (workspace) id (UUID). Discover ids via the list teams endpoint or the agent context.

provider
enum<string>
required

Social platform identifier: x, tiktok, instagram, facebook, youtube, linkedin, threads, or pinterest.

Available options:
x,
tiktok,
instagram,
facebook,
youtube,
linkedin,
threads,
pinterest
Example:

"x"

Body

application/json
returnUrl
string

Approved application destination after vendor consent; omit to use the default connection return page.

Response

Success

authorizationUrl
string
required
state
string
required
flowId
string
required
expiresAt
string
required