Create Onboarding link


Create facebook onboarding link account

Please read carefully the following steps on how the onboarding works


  1. This API allows you to create a facebook onboarding link. you can then send the link to your customer or use for your own facebook page.

  2. Once the client opens the onboarding link, and follow Facebook onboarding process, this will create a connection to the relevant "type" product.

    after the client opens the link, this is what he will be facing:

  • The client is asked to login to his Facebook account. if his browser is already logged in, it will auto recognize it. if the client doesn't have a Facebook account, the onboarding will create an account for him.

  • The client will be asked to choose which facebook page or instagram page he wants to connect (either to the messenger or to manage the page directly)

  • The client will be asked to allow the permission to be shared.

  • Submit. the client click "Confirm" button and the page closes itself. the process is completed and you can start using the API to send information or the webhook to receive information.

3. You will get a webhook once the client completed the process, using the partners webhook

4. You can create as many onboarding links as you need, if you need to connect all 4 types, you must create 4 onboarding links (even if the process looks similar).


Important notice: You don't need an instagram to connect a facebook (page/messenger). but you can not connect instagram without having a facebook page too (means that instagram account must also have a facebook page on hand, you don't necessary must connect the facebook page on the onboarding, but you must have one because instagram page is linked to a facebook page in order to exist)

Settings:

URL

https://partners.99digital.co.il/api/facebook/createOnboarding

Method

JSON via POST

Header

Authorization: Bearer {{access_token}}

*The access_token can be received from settings->get access token API.


Body:

Parameter

Description / Example

Maximum length

Mandatory

type

1 - to connect facebook messenger

2 - to connect instagram messenger

3 - to connect Facebook page management (post and comments + ads leads)

4 - to connect Instagram page (post and comments)

must be int


1

Yes

reference

Any reference you wish to get back on the webhook. this is for your own usage

50

no

server

server URL (relevant for omni channel users only)

200

No

account_id

account id (relevant for omni channel users online)

must be int

50

No

inbox_id

inbox id (relevant for omni channel users online)

must be int

50

No


Response:

{
"status": "OK",
"param": "123456"
"onboarding_link": "https://onboarding.direct/f/123456",
"type": 1 //can be 1/2/3/4 depends on the type you chose,
"reason": 1
}


Response-Explain:

Parameter

Description

status

OK or FAIL

"OK" means the request has been sent to Meta.

"Fail" means error.

param

The onboarding link param value

onboarding_link

The onboarding link to share with your client to connect to Facebook

type

The type you chose

reason

'reason' is the status explanation in case of FAIL

1

not FAIL. the status is OK

2

Wrong credentials

3

Access token does not exist or expired, please generate another one from Settings - Get access token API

4

server error, try again

20

reference is invalid

40

Missing or invalid "type"

41

Invalid server name

42

Invalid account_id

43

invalid inbox_id

44

Contact support, wrong credentials.