TapTalk.io Documentation
  • Introduction
  • OneTalk Omnichannel Documentation
    • Getting Started with OneTalk
      • Team Members
      • Add Topic
      • Assign Agent to Topic
      • Paid Proactive Chat
    • Channel Integration
      • Telegram Integration
      • WhatsApp SME Integration
      • Instagram DM Integration
      • Facebook Messenger Integration
      • Live Chat Integration (iOS, Android, Web)
        • OneTalk Live Chat for Android
          • Get Started
          • Event Listener
          • Authentication
          • Case & Topic
          • Navigate Live Chat UI
          • Customize UI Appearance
        • OneTalk Live Chat for iOS
          • Get Started
          • Background Process in TapTalk.io Omnichannel iOS
          • Event Delegate
          • Authentication
          • Case & Topic
          • Navigate Live Chat UI
          • Customize UI Appearance
        • OneTalk Live Chat for Web
          • Get Started
          • Callback
          • Method
        • OneTalk Live Chat for React Native
          • Get Started - Android
          • Authentication - Android
          • Get Started - iOS
          • Authentication - iOS
        • OneTalk Live Chat for Flutter
          • Get Started - Android
          • Get Started - iOS
      • Google Business Messages Integration
      • Google Business Profile Integration
      • Tokopedia Integration
    • Integration API
      • Inbox API
      • User/Contact API
    • Live Chat Widget Callback Function
    • Social Channel Button
    • Custom Chatbot Integration
      • Get Started
      • Edit or Delete Chatbot
      • Development
    • QnA via API
    • Webhook
  • PowerTalk Chat SDK Documentation
    • Getting Started with PowerTalk
    • PowerTalk Android
      • Get Started
      • Enable Chat Features
      • Authentication
      • TapUI and TapCore
      • Background Process in TapTalk.io
      • Connection
      • Event Listener
      • Push Notification
      • General
      • User
      • Room List
        • Room List - TapUI
        • Room List - TapCore
      • Chat Room and Messages
        • Chat Room and Messages - TapUI
        • Chat Room and Messages - TapCore
      • Contact
      • Message Type
      • Customize UI Appearance
      • Customize Chat Features
      • Customize Chat Message Bubble
      • Customize Navigation Bar
      • Deep Linking
      • Error Codes
    • PowerTalk iOS
      • Get Started
      • TapUI and TapCore
      • Background Process in TapTalk.io
      • Implement Application Delegate
      • Authentication
      • Connection
      • Event Delegate
      • Push Notification
      • General
      • User
      • Room List
        • Room List - TapUI
        • Room List - TapCore
      • Chat Room and Messages
        • Chat Room and Messages - TapUI
        • Chat Room and Messages - TapCore
      • Contact
      • Message Type
      • Customize UI Appearance
      • Customize Chat Features
      • Customize Chat Message Bubble
      • Customize Navigation Bar
      • Deep Linking
      • Error Codes
    • PowerTalk React Native
      • Get Started - Android
      • Get Started - iOS
    • PowerTalk Flutter
      • Get Started - Android
      • Get Started - iOS
    • Javascript SDK
      • Get Started
      • Authentication
      • Connection
      • General
      • Event Listener
      • User
      • Room List
      • Chat Room
      • Messages
      • Contact
      • Message Type
    • Server API
      • Get Started
      • Base URL
      • Authentication
      • User
      • Contact
      • Message
      • Room
    • Webhook
      • Get Started
      • Webhook Payload
  • MeetTalk SDK Documentation
    • Getting Started with MeetTalk
    • MeetTalk Android
      • Get Started
      • Event Listener
    • MeetTalk iOS
      • Get Started
      • Implement Application Delegate
      • Event Delegate
  • SendTalk API Documentation
    • Introduction
    • Whatsapp Verification
Powered by GitBook
On this page
  • Sync Contacts
  • Request
  • Success 200
  • Error 4xx

Was this helpful?

  1. PowerTalk Chat SDK Documentation
  2. Server API

Contact

IMPORTANT!

Server Key ID and Server Key Secret will be used to construct a request and add as a HTTP Header. To construct a request, please format your generated Server Key ID and Server Key Secret and wrap it to Base64, so the format will be like this:

encodeToBase64(SERVER_KEY_ID:SERVER_KEY_SECRET) *don't forget to add colon (:) between Server Key ID and Server Key Secret

Then, put the base64 string on your HTTP Header Field with key “Server-Key” and then construct URL request and parameter for the request.

Sync Contacts

Update and/or delete contacts.

Note that contact works one-way. A user may add another user to his/her contact list without requiring the added user to do the same in return. It works just like how a contact/phone book should.

IMPORTANT!

Contact deletion always run the last. If the contact list contains duplicate owner-contact pairs with one's isDeleted set to true, then that record will always be deleted.

BASE_URL/v1/server/contact/sync

example:
https://taptalk.io/v1/server/contact/sync

Request

Field

Type

Description

contacts

string

(101) The list of contacts to be synced.

ownerXCUserID

string

(102) The XC user ID who owns the contact.

contactXCUserID

string

(103) The contact's XC user ID.

isDeleted

string

(104) If the contact is to be deleted, may be omited if false.

{
    "contacts": [
        {
            "ownerXCUserID": "1",
            "contactXCUserID": "2"
        },
        {
            "ownerXCUserID": "1",
            "contactXCUserID": "6",
            "isDeleted": false
        },
        {
            "ownerXCUserID": "1",
            "contactXCUserID": "9",
            "isDeleted": true
        },
        {
            "ownerXCUserID": "6",
            "contactXCUserID": "1",
            "isDeleted": false
        }
    ]
}

Success 200

Field

Type

Description

countInserted

long

Number of contact rows inserted.

countDeleted

long

Number of contact rows deleted.

{
  "status": 200,
  "error": {
    "code": "",
    "message": "",
    "field": ""
  },
  "data": {
    "countInserted": 3,
    "countDeleted": 1
  }
}

Error 4xx

Name

Description

ParamValidationFailed

The parameter validation failed.

HeaderValidationFailed

The request header validation failed.

{
  "status": 400,
  "error": {
    "code": "40002",
    "message": "Param 'contacts' cannot be empty",
    "field": "101"
  },
  "data": {}
}
{
  "status": 400,
  "error": {
    "code": "40001",
    "message": "Request headers are required (Server-Key)",
    "field": ""
  },
  "data": {}
}
PreviousUserNextMessage

Last updated 4 years ago

Was this helpful?