Social Accounts

Add a social account

This API gives you access to adding a social account to your workspace.

Steps of filling credentials object:

  1. Make an API call to this.

  2. You'll get a list of all authVariables, every object in that array will contain keyname

  3. You'll use the value of name key, as a key in credentials object, then credentials object will look like this

"credentials": {
    "csrf-token": "<value>"
}

Steps of filling platform object:

  1. Use platformId for the value of id, use this for getting platformId

  2. userId will be the unique identifier of the user for that platform

  3. picture will be the profile picture URL

POST/api/v1/public/social-accounts
Authorization
Header parameters
Body
name*string
platformPlatform (object)
latitudestring
longitudestring
variables*object
credentials*object
Response

Account connected successfully

Body
success*boolean
message*string
Example: "Account connected successfully"
data*AddAccount (object)
Request
const response = await fetch('/api/v1/public/social-accounts', {
    method: 'POST',
    headers: {
      "Authorization": "Bearer JWT",
      "X-TexAu-Context": "text",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "name": "text"
    }),
});
const data = await response.json();
Response
{
  "success": false,
  "message": "Account connected successfully",
  "data": {
    "id": "The social account ID",
    "name": "The social account name"
  }
}

Get All social accounts

This API will return all social accounts of a workspace

Get social account by ID

This API will give you social account details by its ID

GET/api/v1/public/social-accounts/{accountId}
Authorization
Path parameters
accountId*string
Header parameters
Response

Account fetched successfully

Body
success*boolean
message*string
Example: "Account fetched successfully"
data*SingleAccountData (object)
Request
const response = await fetch('/api/v1/public/social-accounts/{accountId}', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer JWT",
      "X-TexAu-Context": "text"
    },
});
const data = await response.json();
Response
{
  "success": false,
  "message": "Account fetched successfully",
  "data": {
    "id": "Social Account ID",
    "socialAccountName": "Alex Jordan",
    "platformName": "Linkedin",
    "platformId": "6745retfderty6",
    "proxyId": "6745retfderty6",
    "variables": {
      "key": "value"
    },
    "limits": {
      "platformOperationsId": [
        {
          "limit": "100",
          "interval": "daily | hourly"
        }
      ]
    },
    "credentialsIsExpired": false,
    "proxyIsExpired": false,
    "platformUserId": "https://www.linkedin.com/in/prathmesh-kumar-saini/"
  }
}

Update a social account

This API will be used for updating the credential or proxy

PUT/api/v1/public/social-accounts/{accountId}
Authorization
Path parameters
accountId*string
Header parameters
Body
credentialsobject
variablesobject
namestring
proxyIdstring
latitudestring
longitudestring
Response

Account updated successfully

Body
success*boolean
message*string
Example: "Account updated successfully"
data*AddAccount (object)
Request
const response = await fetch('/api/v1/public/social-accounts/{accountId}', {
    method: 'PUT',
    headers: {
      "Authorization": "Bearer JWT",
      "X-TexAu-Context": "text",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "success": false,
  "message": "Account updated successfully",
  "data": {
    "id": "The social account ID",
    "name": "The social account name"
  }
}

Assign proxy to a social account

Use this API to assign a proxy to a social account and get proxyId from this API.

Always use a proxy with a social account.

PUT/api/v1/public/social-accounts/{accountId}/proxy
Authorization
Path parameters
accountId*string
Header parameters
Body
proxyId*string
Response

Proxy assigned successfully

Body
success*boolean
message*string
Example: "Proxy assigned successfully"
data*AssignProxy (object)
Request
const response = await fetch('/api/v1/public/social-accounts/{accountId}/proxy', {
    method: 'PUT',
    headers: {
      "Authorization": "Bearer JWT",
      "X-TexAu-Context": "text",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "proxyId": "text"
    }),
});
const data = await response.json();
Response
{
  "success": false,
  "message": "Proxy assigned successfully",
  "data": {
    "socialAccountId": "The social account ID",
    "proxyId": "The proxy ID"
  }
}

Remove proxy from a social account

Use this API to remove the proxy from the social account.

Not using a proxy may lead to suspending your social account.

DELETE/api/v1/public/social-accounts/{accountId}/proxy
Authorization
Path parameters
accountId*string
Header parameters
Response

Proxy removed successfully from this account

Body
success*boolean
message*string
Example: "Proxy removed successfully from this account"
Request
const response = await fetch('/api/v1/public/social-accounts/{accountId}/proxy', {
    method: 'DELETE',
    headers: {
      "Authorization": "Bearer JWT",
      "X-TexAu-Context": "text"
    },
});
const data = await response.json();
Response
{
  "success": false,
  "message": "Proxy removed successfully from this account"
}

Reset proxy of a social account.

This API will reset only the factory proxy not the user proxy of a social account.

Set limit

Use this API to set automation limits for the specific social account

Reset Limit to default (Delete limit)

Use this API to reset the limit of automation to default one (delete the limit at the account level)

Delete a social account

DELETE/api/v1/public/social-accounts/{accountId}
Authorization
Path parameters
accountId*string
Header parameters
Response

Account deleted successfully

Body
success*boolean
message*string
Example: "Account deleted successfully"
data*AddAccount (object)
Request
const response = await fetch('/api/v1/public/social-accounts/{accountId}', {
    method: 'DELETE',
    headers: {
      "Authorization": "Bearer JWT",
      "X-TexAu-Context": "text"
    },
});
const data = await response.json();
Response
{
  "success": false,
  "message": "Account deleted successfully",
  "data": {
    "id": "The social account ID",
    "name": "The social account name"
  }
}

Force Delete a social account

This endpoint is being used when a social account is used in running workflow, and user wish to force delete it.

Last updated