Available in Classic and VPC
Send friend requests to multiple users at once. Users who receive the request can view the request history in their notifications.
Request
This section describes the request format. The method and URI are as follows:
Method | URI |
---|---|
GET | /v1/api/v1/api/friendship/bulk |
Request headers
For information about the headers common to all Ncloud Chat APIs, see Ncloud Chat request headers.
Request body
You can include the following data in the body of your request:
Field | Type | Required | Description |
---|---|---|---|
userId |
String | Required | User ID
|
friendId |
String | Required | Friend ID
|
Request example
The request example is as follows:
curl --location --request POST 'https://dashboard-api.ncloudchat.naverncp.com/v1/api/friendship/bulk' \
--header 'x-api-key: {API Key}' \
--header 'x-project-id: {Project ID}' \
--header 'Content-Type: application/json' \
--data '[
{
"userId": "guestID2",
"friendId": "osoriz123"
},
{
"userId": "guestID2",
"friendId": "NCP007"
}
]'
Response
This section describes the response format.
Response body
The response body includes the following data:
Field | Type | Required | Description |
---|---|---|---|
message |
String | - | Response message |
Response status codes
For information about the HTTP status codes common to all Ncloud Chat APIs, see Common Ncloud Chat response status codes.
Response example
The response example is as follows:
{
"message": "Friends added successfully"
}