This event is sent to your server when a player try to add a contact from the mobile application.
Event name: contacts@add
⚠️ Response required / expires after 60 seconds
| Key | Type | Description |
|---|---|---|
custom_id | string | Unique identifier from your services (1-64 characters) |
contact | IncomingContactPayload | Contact payload |
You need to emit an event with the following name and data:
Response event name: contacts@add/response
| Key | Type | Extra | Description |
|---|---|---|---|
custom_id | string | required | Unique identifier from your services (1-64 characters) |
contact | Contact | required | contact object |
Important
Response object must respect every type rule. If any structure isn't respected, your request will be rejected for "bad-request".
I received a request for the following custom_id = 1234
My response will be:
{
"custom_id": "1234",
"contact": {
"uid": "8756",
"displayName": "Hank",
"number": "555-6671"
}
}
You must notify iPear if the data does not comply with your verification processes.
Response Error event name: contacts@add/error
| Key | Type | Extra | Description |
|---|---|---|---|
custom_id | string | required | Unique identifier from your services (1-64 characters) |
contact | Contact | required | contact object (incoming data) |
error | string (Error list) | required | Available errors for this case: player-not-found, contact-already-exist, unknown |
My player with the following ID: 1234 already has contact details with the number 555-6671
{
"custom_id": "1234",
"error": "contact-already-exist",
"contact": {
"displayName": "Hank",
"number": "555-6671"
}
}
Incoming events
Outgoing events
Powered by Doctave