--- title: "友達の管理" slug: "game-gamepot-friend" updated: 2026-09-17T09:57:53Z published: 2026-09-17T09:57:53Z canonical: "api.ncloud-docs.com/game-gamepot-friend" --- > ## Documentation Index > Fetch the complete documentation index at: https://api.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # 友達の管理 ## 友達管理 ### 友達リクエスト 他のユーザーに友達リクエストを送信します。受信者はそのリクエストの通知を受け取ります。 #### Request - Method : POST - URI : https://gamepot.apigw.ntruss.com/gpapps/v2/friendship/request ``` POST url : https://gamepot.apigw.ntruss.com/gpapps/v2/friendship/request Header : 'content-type: application/json' Header 'x-api-key: 86dcgffae0xxxxxxxxxxxxxx' Header : 'x-project-id: ec8231b2-6b20-4ad1-xxxx-xxxxxxxxx' data: { "userId": "80803902-8b83-4860-b8a6-xxxxxxxx", "friendId": "a1c4aaa2-02f6-40bd-afb4-xxxxxxx", "message": "友達になりましょう!!" } ``` | Header | Type | Required | Description | | --- | --- | --- | --- | | X-API-KEY | String | O | GamePotで発行する認証キー | | X-PROJECT-ID | String | O | ダッシュボードプロジェクト ID | | Attribute | Type | Required | Description | | --- | --- | --- | --- | | userId | String | O | ユーザー ID | | friendId | String | O | 友達追加 ID | | message | String | X | メッセージ | ### Response 成功 ``` { "friendship": { "project_id": "ec8231b2-6b20-4ad1-9c59-xxxxx", "id": "5fe78d95-6186-4128-b52a-28759cxxxxxx", "status": "requested", "user_id" : "xxxxxxxxxx", "user": { "id": "xxxxxxxxxx", "nickname": "xxxxxxxxxx" }, "friend_id" : "xxxxxxxx", "friend": { "id": "xxxxxxxxxx", "nickname": "xxxxxxxxxx" }, "friend_id": "a1c4aaa2-02f6-40bd-afb4-b1d6caacf0de", "requested_at": "2023-01-31T16:13:26-08:00" } } ``` | Attribute | Type | Description | | --- | --- | --- | | friendship.project_id | String | プロジェクト ID | | friendship.id | String | 入力 ID | | friendship.user_id | String | ユーザー ID | | friendship.status | String | 状態 | | friendship.user_id | String | ID | | friendship.user | Object | マイ情報 | | friendship.friend_id | String | 友達 ID | | friendship.friend | Object | 友達情報 | | friendship.requested_at | String | リクエスト日 | 失敗 ``` { "status": -1, "message": "エラーメッセージ" } ``` | Attribute | Type | Description | | --- | --- | --- | | code | Int | 結果値(1: 成功、失敗時 Error code参照) | | error | String | エラー内容 | ### 友達承諾 相手から送られてきた友達リクエストを承諾します。承諾後、両ユーザーは友達関係になります。 #### Request - Method : POST - URI : https://gamepot.apigw.ntruss.com/gpapps/v2/friendship/accept ``` POST url : https://gamepot.apigw.ntruss.com/gpapps/v2/friendship/accept Header : 'content-type: application/json' Header 'x-api-key: 86dcgffae0xxxxxxxxxxxxxx' Header : 'x-project-id: ec8231b2-6b20-4ad1-xxxx-xxxxxxxxx' data: { "userId": "a1c4aaa2-02f6-40bd-afb4-xxxxxxxxx", "friendId": "80803902-8b83-4860-b8a6-xxxxxxx" } ``` | Header | Type | Required | Description | | --- | --- | --- | --- | | X-API-KEY | String | O | GamePotで発行する認証キー | | X-PROJECT-ID | String | O | ダッシュボードプロジェクト ID | | Attribute | Type | Required | Description | | --- | --- | --- | --- | | userId | String | O | ユーザー ID | | friendId | String | O | 友達追加 ID | ### Response 成功 ``` { "friendship": { "project_id": "ec8231b2-6b20-4ad1-9c59-xxxxxx", "id": "5fe78d95-6186-4128-b52a-xxxxxxxxx", "status": "accepted", "user_id" : "xxxxxxxxxx", "user": { "id": "xxxxxxxxxx", "nickname": "xxxxxxxxxx" }, "friend_id" : "xxxxxxxx", "friend": { "id": "xxxxxxxxxx", "nickname": "xxxxxxxxxx" }, "friend_id": "80803902-8b83-4860-b8a6-xxxxxxxxx", "created_at": "2023-01-31T16:13:26-08:00", "updated_at": "2023-01-31T16:13:26-08:00", "requested_at": "2023-01-31T16:13:26-08:00" } } ``` | Attribute | Type | Description | | --- | --- | --- | | friendship.project_id | String | プロジェクト ID | | friendship.id | String | 入力 ID | | friendship.user_id | String | ユーザー ID | | friendship.status | String | 状態 | | friendship.user_id | String | ID | | friendship.friend_id | String | 友達 ID | | friendship.user | Object | マイ情報 | | friendship.friend | Object | 友達情報 | | friendship.requested_at | String | リクエスト日 | 失敗 ``` { "status": -1, "message": "エラーメッセージ" } ``` | Attribute | Type | Description | | --- | --- | --- | | code | Int | 結果値(1: 成功、失敗時 Error code参照) | | error | String | エラー内容 | ### 友達拒否 相手から送られてきた友達リクエストを拒否します。 #### Request - Method : POST - URI : https://gamepot.apigw.ntruss.com/gpapps/v2/friendship/reject ``` POST url : https://gamepot.apigw.ntruss.com/gpapps/v2/friendship/reject Header : 'content-type: application/json' Header 'x-api-key: 86dcgffae0xxxxxxxxxxxxxx' Header : 'x-project-id: ec8231b2-6b20-4ad1-xxxx-xxxxxxxxx' data: { "userId": "a1c4aaa2-02f6-40bd-afb4-xxxxxxx", "friendId": "80803902-8b83-4860-b8a6-xxxxxx" } ``` | Header | Type | Required | Description | | --- | --- | --- | --- | | X-API-KEY | String | O | GamePotで発行する認証キー | | X-PROJECT-ID | String | O | ダッシュボードプロジェクト ID | | Attribute | Type | Required | Description | | --- | --- | --- | --- | | userId | String | O | ユーザー ID | | friendId | String | O | 友達追加 ID | ### Response 成功 ``` { "friendship": { "project_id": "ec8231b2-6b20-4ad1-9c59-xxxxxx", "id": "5fe78d95-6186-4128-b52a-xxxxxxxxx", "status": "rejected", "user_id" : "xxxxxxxxxx", "user": { "id": "xxxxxxxxxx", "nickname": "xxxxxxxxxx" }, "friend_id" : "xxxxxxxx", "friend": { "id": "xxxxxxxxxx", "nickname": "xxxxxxxxxx" }, "friend_id": "80803902-8b83-4860-b8a6-xxxxxxxxx", "created_at": "2023-01-31T16:13:26-08:00", "updated_at": "2023-01-31T16:13:26-08:00", "requested_at": "2023-01-31T16:13:26-08:00" } } ``` | Attribute | Type | Description | | --- | --- | --- | | friendship.project_id | String | プロジェクト ID | | friendship.id | String | 入力 ID | | friendship.user_id | String | ID | | friendship.friend_id | String | 友達 ID | | friendship.status | String | 状態 | | friendship.user | Object | マイ情報 | | friendship.friend | Object | 友達情報 | | friendship.requested_at | String | リクエスト日 | 失敗 ``` { "status": -1, "message": "エラーメッセージ" } ``` | Attribute | Type | Description | | --- | --- | --- | | code | Int | 結果値(1: 成功、失敗時 Error code参照) | | error | String | エラー内容 | ### 友達をやめる 他のユーザーとの友達関係をやめることができる機能です。友達をやめるには、友達リストからそのユーザーを削除します。やめた友達と再び友達関係を結びたい場合は、新たに友達リクエストを送信する必要があります。 #### Request - Method : POST - URI : https://gamepot.apigw.ntruss.com/gpapps/v2/friendship ``` DELETE url : https://gamepot.apigw.ntruss.com/gpapps/v2/friendship Header : 'content-type: application/json' Header 'x-api-key: 86dcgffae0xxxxxxxxxxxxxx' Header : 'x-project-id: ec8231b2-6b20-4ad1-xxxx-xxxxxxxxx' data: { "userId": "80803902-8b83-4860-b8a6-xxxxxx", "friendId": "a1c4aaa2-02f6-40bd-afb4-xxxxxxx", } ``` | Header | Type | Required | Description | | --- | --- | --- | --- | | X-API-KEY | String | O | GamePotで発行する認証キー | | X-PROJECT-ID | String | O | ダッシュボードプロジェクト ID | | Attribute | Type | Required | Description | | --- | --- | --- | --- | | userId | String | O | ユーザー ID | | friendId | String | O | 友達追加 ID | ### Response 成功 ``` { "friendship": { "project_id": "ec8231b2-6b20-4ad1-9c59-xxxxxx", "id": "5fe78d95-6186-4128-b52a-xxxxxxxxx", "status": "deleted", "user_id" : "xxxxxxxxxx", "user": { "id": "xxxxxxxxxx", "nickname": "xxxxxxxxxx" }, "friend_id" : "xxxxxxxx", "friend": { "id": "xxxxxxxxxx", "nickname": "xxxxxxxxxx" }, "created_at": "2023-01-31T16:13:26-08:00", "updated_at": "2023-01-31T16:13:26-08:00", "requested_at": "2023-01-31T16:13:26-08:00" } } ``` | Attribute | Type | Description | | --- | --- | --- | | friendship.project_id | String | プロジェクト ID | | friendship.id | String | 入力 ID | | friendship.status | String | 状態 | | friendship.user_id | String | ID | | friendship.friend_id | String | 友達 ID | | friendship.user | Object | マイ情報 | | friendship.friend | Object | 友達情報 | | friendship.requested_at | String | リクエスト日 | 失敗 ``` { "status": -1, "message": "エラーメッセージ" } ``` | Attribute | Type | Description | | --- | --- | --- | | code | Int | 結果値(1: 成功、失敗時 Error code参照) | | error | String | エラー内容 | ### 友達リスト 現在の友達リストを表示します。 #### Request - Method : GET - URI : https://gamepot.apigw.ntruss.com/gpapps/v2/friendships?filter={"status":"accepted","user_id":"2d51cc68-a0d9-xxxxx-xxxx-xxxxxxxxxxxx"} ``` POST url : https://gamepot.apigw.ntruss.com/gpapps/v2/friendship?filter={"status":"accepted","user_id":"2d51cc68-a0d9-xxxxx-xxxx-xxxxxxxxxxxx"} Header 'x-api-key: 86dcgffae0xxxxxxxxxxxxxx' Header : 'x-project-id: ec8231b2-6b20-4ad1-xxxx-xxxxxxxxx' ``` | Header | Type | Required | Description | | --- | --- | --- | --- | | X-API-KEY | String | O | GamePotで発行する認証キー | | X-PROJECT-ID | String | O | ダッシュボードプロジェクト ID | | Attribute | Type | Required | Description | | --- | --- | --- | --- | | filter | String | O | クエリをフィルタ全てのフィールドで検索が可能です。 | | user_id | String | O | ユーザー ID | ** フィルタはコードによって様々な活用が可能です。 Statusコードによって友達リストを検索できます。 "accepted" : 私と友達を承認した友達リスト "rejected" : 友達の受け入れを拒否したリスト "requested" : 友達リクエストしたリスト "pending" : 友達リクエストを受けたリスト ### Response 成功 ``` [ { "project_id": "ec8231b2-6b20-4ad1-9c59-8e183087a742", "id":"xxxxxxxxxxxxxxxxxxxx", "status": "accepted", "user_id" : "xxxxxxxxxx", "user": { "id": "xxxxxxxxxx", "nickname": "xxxxxxxxxx" }, "friend_id" : "xxxxxxxx", "friend": { "id": "xxxxxxxxxx", "nickname": "xxxxxxxxxx" }, "created_at": "2023-01-31T16:28:00-08:00", "updated_at": "2023-01-31T16:28:03-08:00", "requested_at": "2023-01-31T16:28:00-08:00" }, { "project_id": "ec8231b2-6b20-4ad1-9c59-8e183087a742", "id":"xxxxxxxxxxxxxxxxxxxx", "status": "accepted", "user_id" : "xxxxxxxxxx", "user": { "id": "xxxxxxxxxx", "nickname": "xxxxxxxxxx" }, "friend_id" : "xxxxxxxx", "friend": { "id": "xxxxxxxxxx", "nickname": "xxxxxxxxxx" }, "created_at": "2023-01-31T16:28:00-08:00", "updated_at": "2023-01-31T16:28:03-08:00", "requested_at": "2023-01-31T16:28:00-08:00" } ] ``` | Attribute | Type | Description | | --- | --- | --- | | project_id | String | プロジェクト ID | | id | String | 固有 ID | | status | String | 状態 | | user_id | String | ID | | friend_id | String | 友達 ID | | user | Object | マイ情報 | | friend | Object | 友達情報 | | created_at | String | 作成日 | | updated_at | String | アップデート日 | | requested_at | String | リクエスト日 | 失敗 ``` { "status": -1, "message": "エラーメッセージ" } ``` | Attribute | Type | Description | | --- | --- | --- | | code | Int | 結果値(1: 成功、失敗時 Error code参照) | | error | String | エラー内容 |