How to create a contact with social handlers via UI and API

 

The SCG API and the SCG portal enable the user to create a single contact and upload files with contacts information be referenced when sending SCG messages. This provides the functionality to store contacts information.

 

 This document provides a step-by-step procedure to create a contact with Social Handler in SCG for later use when sending messages.

 

Creating a contact with social handler in SCG through the UI (SCG portal)

1. Log in to SDC portal:

LoginScreen.jpg

 

2. Click on the Voice & Messaging Console menu option:

VoiceConsoleOption.jpg

 

3. Select you SCG account and click Select button:

Account_selection.jpg

 

4. Click the Addressbook menu

Select_Addressbook.jpg

 

5. Select Contacts option

Select_contacts.jpg

 

6. Click the + New Contact button

Select_New_contact.jpg

 

7. Type the contact information and for the Social Handler click Social handler + button

SocialHandler%2Bbutton.jpg

 

8. Type the Social Handler for example: wa:+1346787XXXX@1813305XXXX

SocialHandler_field.jpg

 

9. When ready, click the Save button

click_SAVE_button.jpg

 

10. A contact created successfully message will be displayed

created_Ok.jpg

 

Your contact is now stored in the SCG Contacts and can be used in SCG messages.

New_contact_listed.jpg

 

 

 

Creating a contact with social handler in SCG through an SCG API call

 

To create a contact with Social Handler through the API you can execute the curl command:

curl --location --request \
POST 'https://api.syniverse.com/scg-external-api/api/v1/contacts' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer [TOKEN]' \
--data-raw '{
"birth_date": "1970-01-01T11:20:39.270Z",
"voice_preference": "NONE",
"social_handles": [
"wa:+447732130000@18133050000"
],
"first_name": "Jane",
"last_name": "Doe",
"primary_mdn": "44773213XXXX",
"primary_email_addr": "jane.doe@test.com",
"primary_addr_country": "GBR",
"extended_attributes": "{}"
}'

R/
{"id":"iEmwXVmT6YKYJQXeV6qlk"}

 

 

Sending a message using a contact

curl -L -X \
POST
'https://api.syniverse.com/scg-external-api/api/v1/messaging/messages' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer 6f25271a-aa01-3ef8-97c1-90bf5bc0af4b' \
-d '{
"from":"channel:1KJPMkuHQkair_o15etpmg",
"to":"contact:iEmwXVmT6YKYJQXeV6qlk",
"body":"This is a test message"
}'

 

 

 

 

For further information on how to upload contacts using the SCG API click How to programmatically upload/import Contacts to your Account

 

 

 

 

Was this article helpful?
0 out of 0 found this helpful

0 Comments

Please sign in to leave a comment.