Overview
InTarget integrates with Meta's Messenger platform to link players from your product to their Facebook or Instagram accounts. Once matched, InTarget can send CRM messages directly to players via Messenger or Instagram DM.
Flow at a glance:
Player sends any message to your bot (Facebook Page or Instagram account)
Bot replies with a personalized login link containing a unique hash token
Player opens the link and logs in on your product
Your backend sends the hash + player ID to InTarget's match API
Player is matched — InTarget can now send them CRM messages via Messenger / Instagram DM
⏱ Messaging window: Meta allows messaging users who have initiated contact within the last 24 hours. To maintain delivery reliability, send messages slightly more frequently than once per 24 hours.
What You Need to Provide to InTarget
Before the integration can go live, please share the following with the InTarget team:
Parameter | Description |
| Your Facebook Page ID |
| Page Access Token generated in Meta for Developers |
| Base URL of your product's login page |
| Title text shown on the button card sent to the user |
| Subtitle / body text shown below the button |
Example format:
json
{
"pageId": "YOUR_PAGE_ID",
"pageAccessToken": "YOUR_PAGE_ACCESS_TOKEN",
"loginUrl": "https://yourcasino.com/login",
"loginButtonTitle": "Log in to continue",
"loginButtonText": "Click the button below to verify your account"
}
Facebook Messenger Setup
Step 1 — Create or Access Your Meta App
Select your existing app, or create a new one linked to your Facebook Page
Add the Messenger product to your app
Step 2 — Get Your Page ID
Open the Page you would like to find the ID for.
Click your Page name at the top.
Click
Transparency and privacy policy.
You will find your Page ID below Page information for [Page name].
Step 3 — Generate a Page Access Token
In Meta for Developers → your app → Messenger → Settings
Under Access Tokens, select your Facebook Page
Click Generate Token and copy the value
Send it to InTarget along with your Page ID
Step 4 — Register the InTarget Webhook
In your app settings → Messenger → Webhooks, add:
Callback URL:
https://api.intarget.app/pub/messenger-webhookVerify Token: BCa33zmLo0
Subscribe to the following events:
messagesmessaging_postbacksmessage_deliveriesmessage_reads
Instagram Direct Setup
Step 1 — Connect Instagram to Your Facebook Page
Go to your Facebook Page → Settings → Instagram
Connect your Instagram Business account to the Page
In Meta for Developers, add Instagram to your app and enable Instagram Messaging
Step 2 — Get Your Page ID and Access Token
The Page ID and Page Access Token are tied to the Facebook Page that controls the Instagram account — follow the same steps as in the Facebook setup above.
Step 3 — Register the InTarget Webhook
In your app settings → Instagram → Webhooks, add:
Callback URL:
https://api.intarget.app/pub/messenger-webhookVerify Token: BCa33zmLo0
Subscribe to the following events:
messagesmessaging_postbacksmessage_deliveriesmessage_reads
Player Matching Flow (Backend Integration)
When a player clicks the login link sent by the bot, the URL will contain a unique hash:
https://yourcasino.com/login?hash=<unique_hash>&utm_source=InTarget&utm_medium=facebook
Once the player authenticates on your product, your backend must call the InTarget match API:
Endpoint:
POST https://api.intarget.app/rest/bot-link/match?access-token=<your_intarget_token>
Request body:
json
{
"loginHash": "<hash_from_url>",
"playerId": "<your_internal_player_id>",
"projectId": <your_intarget_project_id>
}
Successful response:
json
{
"data": {
"mapping_id": 9,
"messenger_user_id": "..."
}
}Once this call succeeds, the player is matched and InTarget can send them messages via the connected Messenger or Instagram channel.
The access-token for the InTarget API is issued by InTarget — request it from your account manager.


