Starts OAuth For Instagram Account

get
https://services.leadconnectorhq.com/social-media-posting/oauth/instagram/start

Open the API in a window with appropriate params and headers instead of using the Curl. User is navigated to Instagram login OAuth screen. On successful login, listen on window object for message where event listener returns data in its callback function.

window.addEventListener('message',
function(e) {
if (e.data && e.data.page === 'social_media_posting') {
const { actionType, page, platform, placement, accountId, reconnectAccounts } = e.data
}
},
false)
{
actionType: string, Ex: "close"
page: string, Ex: "social-media-posting"
platform: string, Ex: "instagram"
placement: string, Ex: "placement"
accountId: string, Ex: "658a9b6833b91e0ecb8f3958"
reconnectAccounts: string[]] Ex: ["658a9b6833b91e0ecb834acd", "efd2daa9b6833b91e0ecb8f3511"]
}

API: '/social-media-posting/oauth/instagram/accounts/:accountId'

Method: GET

Request

Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.

Provide your bearer token in the Authorization header when making requests to protected resources.

Example: Authorization: Bearer 123
Query Parameters
page
string

Page

Examples:
integration
reconnect
string

Reconnect

Examples:
true
locationId
string
required

Location Id

Examples:
w37swmmLbA02zgqKPpxITe2
userId
string
required

User Id

Examples:
u37swmmLbA02zgqKPpxITe2
Headers
Authorization
string
required

Access Token

Example:
Bearer 9c48df2694a849b6089f9d0d3513efe
Version
string
required

API Version

Allowed value:
2021-07-28

Responses

Successful response

success
boolean
required

Success or Failure

Example:
true
statusCode
number
required

Status Code

Example:
201
message
string
required

Message

Example:
Added Facebook Account
results
object

Requested Results

_id
string
Example:
65f2d989a4f2f1e5322c3856
oAuthId
string
Example:
u37swmmLbA02zgqKPpxITe2
oldId
string
Example:
u37swmmLbA02zgqKPpxITe2
locationId
string
Example:
u37swmmLbA02zgqKPpxITe2
originId
string
Example:
u37swmmLbA02zgqKPpxITe2
platform
object
Example:
facebook
type
object

type value must be page

Example:
page
name
string
Example:
Account Name
avatar
string
Example:
u37swmmLbA02zgqKPpxITe2
meta
object
Example:
{"pageId":"u37swmmLbA02zgqKPpxITe2","page":{"id":"u37swmmLbA02zgqKPpxITe2","name":"Account Name","avatar":"u37swmmLbA02zgqKPpxITe2"},"storeCode":"122","isVerified":"true","verified":true,"protected":true,"locationId":"u37swmmLbA02zgqKPpxITe2","accountId":"u37swmmLbA02zgqKPpxITe2","openId":"u37swmmLbA02zgqKPpxITe2","urn":"u37swmmLbA02zgqKPpxITe2","username":"testUser","storefrontAddress":{"regionCode":"30021","languageCode":"E001","postalCode":"1221","administrativeArea":"Down Town","locality":"Louis Street","addressLines":["207","county"]}}
active
boolean
Example:
true
deleted
boolean
Example:
true
createdAt
string<date-time>

created date

Example:
2024-03-14T11:03:37.015Z
updatedAt
string<date-time>

updated date

Example:
2024-03-14T11:03:37.015Z

Unprocessable Entity

statusCode
number
Example:
422
message
array[string]
Example:
["Unprocessable Entity"]
error
string
Example:
Unprocessable Entity

Unauthorized

statusCode
number
Example:
401
message
string
Example:
Invalid token: access token is invalid
error
string
Example:
Unauthorized

Bad Request

statusCode
number
Example:
400
message
string
Example:
Bad Request