curl -X POST \
'https://{YOUR_AUTHENTICATE_PLAYER_ENDPOINT}' \
-H 'Content-Type: application/json' \
-H 'x-publisher-token: <x-publisher-token>' \
-H 'signature: <signature>' \
-d '{
"authMethod": "otp",
"date": "2025-10-21T14:17:27.329Z",
"appId": "NA",
"playerLocation": {
"countryCode2": "US",
"state": "FL"
},
"otp": {
"playerCode": "974018",
"accessToken": "9ac888fa33412197b"
},
"os": "ios",
"sessionId": "2e55b3fc-31ef-6dd7-8161-8aeb376b3a23"
}'
curl -X POST \
'https://{YOUR_AUTHENTICATE_PLAYER_ENDPOINT}' \
-H 'Content-Type: application/json' \
-H 'x-publisher-token: <x-publisher-token>' \
-H 'signature: <signature>' \
-d '{
"authMethod": "google",
"token": "sdfddtt7",
"date": "2024-07-21T14:17:27.329Z",
"appId": "611392880818819",
"playerLocation": {
"countryCode2": "US",
"state": "NY"
},
"os": "android",
"utmSource": "Instagram",
"utmCampaign": "spring_sale.",
"sessionId": "2e55b3fc-31ef-6dd7-8161-8aeb376b3a23"
}'
{
"status": "valid",
"playerProfileImage": "",
"publisherPlayerId": "986222719",
"playerName": "Mary Littlelamb",
"playerOverrideCountry": "CA",
"sessionMetadata": {
"abTest": "group1",
"locale": "en-CA"
}
}
{
"status": "valid",
"playerProfileImage": "https://scontent-iad4-1.xx.fbcdn.net/v/t6.30597-1/84628273_176159830277856_972693363922829312_n.jpg?stp=c379.0.1290.1290a_cp0_dst-jpg_s50x50_tt6&ccb=1-7",
"publisherPlayerId": "vip2247691",
"playerName": "Jim Cardashian",
"sessionMetadata": {
"abTest": "group1",
"locale": "en-US"
}
}
{
"status": "Invalid",
"publisherErrorMessageType": "plainText",
"publisherErrorMessage": "Lost internet connection.",
"publisherErrorMessageTitle": "Whoops! Login Failed."
}
Authenticate Player Callback
Note: This is a callback API. Appcharge calls this endpoint on your server when specific events occur.
Notifies your system to authenticate a player in your web store.
Appcharge calls this endpoint when a player attempts to log in to your web store using one of the configured login methods. Your server identifies the player and responds with either the player data or an authentication error.
If the response indicates a successful authentication, the player is logged in to the web store.
curl -X POST \
'https://{YOUR_AUTHENTICATE_PLAYER_ENDPOINT}' \
-H 'Content-Type: application/json' \
-H 'x-publisher-token: <x-publisher-token>' \
-H 'signature: <signature>' \
-d '{
"authMethod": "otp",
"date": "2025-10-21T14:17:27.329Z",
"appId": "NA",
"playerLocation": {
"countryCode2": "US",
"state": "FL"
},
"otp": {
"playerCode": "974018",
"accessToken": "9ac888fa33412197b"
},
"os": "ios",
"sessionId": "2e55b3fc-31ef-6dd7-8161-8aeb376b3a23"
}'
curl -X POST \
'https://{YOUR_AUTHENTICATE_PLAYER_ENDPOINT}' \
-H 'Content-Type: application/json' \
-H 'x-publisher-token: <x-publisher-token>' \
-H 'signature: <signature>' \
-d '{
"authMethod": "google",
"token": "sdfddtt7",
"date": "2024-07-21T14:17:27.329Z",
"appId": "611392880818819",
"playerLocation": {
"countryCode2": "US",
"state": "NY"
},
"os": "android",
"utmSource": "Instagram",
"utmCampaign": "spring_sale.",
"sessionId": "2e55b3fc-31ef-6dd7-8161-8aeb376b3a23"
}'
{
"status": "valid",
"playerProfileImage": "",
"publisherPlayerId": "986222719",
"playerName": "Mary Littlelamb",
"playerOverrideCountry": "CA",
"sessionMetadata": {
"abTest": "group1",
"locale": "en-CA"
}
}
{
"status": "valid",
"playerProfileImage": "https://scontent-iad4-1.xx.fbcdn.net/v/t6.30597-1/84628273_176159830277856_972693363922829312_n.jpg?stp=c379.0.1290.1290a_cp0_dst-jpg_s50x50_tt6&ccb=1-7",
"publisherPlayerId": "vip2247691",
"playerName": "Jim Cardashian",
"sessionMetadata": {
"abTest": "group1",
"locale": "en-US"
}
}
{
"status": "Invalid",
"publisherErrorMessageType": "plainText",
"publisherErrorMessage": "Lost internet connection.",
"publisherErrorMessageTitle": "Whoops! Login Failed."
}
curl -X POST \
'https://{YOUR_AUTHENTICATE_PLAYER_ENDPOINT}' \
-H 'Content-Type: application/json' \
-H 'x-publisher-token: <x-publisher-token>' \
-H 'signature: <signature>' \
-d '{
"authMethod": "otp",
"date": "2025-10-21T14:17:27.329Z",
"appId": "NA",
"playerLocation": {
"countryCode2": "US",
"state": "FL"
},
"otp": {
"playerCode": "974018",
"accessToken": "9ac888fa33412197b"
},
"os": "ios",
"sessionId": "2e55b3fc-31ef-6dd7-8161-8aeb376b3a23"
}'
curl -X POST \
'https://{YOUR_AUTHENTICATE_PLAYER_ENDPOINT}' \
-H 'Content-Type: application/json' \
-H 'x-publisher-token: <x-publisher-token>' \
-H 'signature: <signature>' \
-d '{
"authMethod": "google",
"token": "sdfddtt7",
"date": "2024-07-21T14:17:27.329Z",
"appId": "611392880818819",
"playerLocation": {
"countryCode2": "US",
"state": "NY"
},
"os": "android",
"utmSource": "Instagram",
"utmCampaign": "spring_sale.",
"sessionId": "2e55b3fc-31ef-6dd7-8161-8aeb376b3a23"
}'
{
"status": "valid",
"playerProfileImage": "",
"publisherPlayerId": "986222719",
"playerName": "Mary Littlelamb",
"playerOverrideCountry": "CA",
"sessionMetadata": {
"abTest": "group1",
"locale": "en-CA"
}
}
{
"status": "valid",
"playerProfileImage": "https://scontent-iad4-1.xx.fbcdn.net/v/t6.30597-1/84628273_176159830277856_972693363922829312_n.jpg?stp=c379.0.1290.1290a_cp0_dst-jpg_s50x50_tt6&ccb=1-7",
"publisherPlayerId": "vip2247691",
"playerName": "Jim Cardashian",
"sessionMetadata": {
"abTest": "group1",
"locale": "en-US"
}
}
{
"status": "Invalid",
"publisherErrorMessageType": "plainText",
"publisherErrorMessage": "Lost internet connection.",
"publisherErrorMessageTitle": "Whoops! Login Failed."
}
Body
Response
Player profile image. If no image is available, an empty string must be provided. In this case, a default image is displayed.
"https://scontent-iad4-1.xx.fbcdn.net/v/t6.30597-1/84628273_176159830277856_972693363922829312_n.jpg?stp=c379.0.1290.1290a_cp0_dst-jpg_s50x50_tt6&ccb=1-7"
An object for passing data related to the player's session. It is returned in the Grant Award Callback, and if enabled, the Personalization API.
{ "abTest": "group1", "locale": "en-US" }
Error message type. Supported values:
none: No error message is provided.plainText: A basic error message in plain text.enrichedText: A formatted error message in MD format that may contain additional styling or elements.
none, plainText, enrichedText "plainText"
Overrides the player's detected location for pricing purposes. Use when the player's country of origin differs from their detected country. Must be a two-letter country code in ISO-3166 alpha-2 format.
"CA"
Was this page helpful?
