Manage friend
    • PDF

    Manage friend

    • PDF

    Article summary

    Manage friend

    Send friend request

    You can send a friend request to other users. The recipients will get notified of your request.

    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": "Be my friend!"
    }
    
    HeaderTypeRequiredDescription
    X-API-KEYStringOAuthentication key issued by GAMEPOT
    X-PROJECT-IDStringODashboard project ID
    AttributeTypeRequiredDescription
    userIdStringOUser ID
    friendIdStringOAdd friend ID
    messageStringXMessage

    Response

    Succeeded

    {
       "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"
        }
    }
    
    AttributeTypeDescription
    friendship.project_idStringProject ID
    friendship.idStringInput ID
    friendship.user_idStringUser ID
    friendship.statusStringStatus
    friendship.user_idStringID
    friendship.userObjectMy Information
    friendship.friend_idStringFriend ID
    friendship.friendObjectFriend information
    friendship.requested_atStringRequest date

    Failed

    {
        "status": -1,
        "message": "Error message"
    }
    
    AttributeTypeDescription
    codeIntResult (1: success, refer to the error code in case of failure)
    errorStringError message

    Accept friend request

    You can accept friend requests from others. You are connected with the counterpart as friends once you accept the request.

    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"
    }
    
    HeaderTypeRequiredDescription
    X-API-KEYStringOAuthentication key issued by GAMEPOT
    X-PROJECT-IDStringODashboard project ID
    AttributeTypeRequiredDescription
    userIdStringOUser ID
    friendIdStringOAdd friend ID

    Response

    Succeeded

    {
       "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"
        }
    }
    
    AttributeTypeDescription
    friendship.project_idStringProject ID
    friendship.idStringInput ID
    friendship.user_idStringUser ID
    friendship.statusStringStatus
    friendship.user_idStringID
    friendship.friend_idStringFriend ID
    friendship.userObjectMy Information
    friendship.friendObjectFriend information
    friendship.requested_atStringRequest date

    Failed

    {
        "status": -1,
        "message": "Error message"
    }
    
    AttributeTypeDescription
    codeIntResult (1: success, refer to the error code in case of failure)
    errorStringError message

    Reject friend request

    You can reject friend requests from others.

    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"
    }
    
    HeaderTypeRequiredDescription
    X-API-KEYStringOAuthentication key issued by GAMEPOT
    X-PROJECT-IDStringODashboard project ID
    AttributeTypeRequiredDescription
    userIdStringOUser ID
    friendIdStringOAdd friend ID

    Response

    Succeeded

    {
       "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"
        }
    }
    
    AttributeTypeDescription
    friendship.project_idStringProject ID
    friendship.idStringInput ID
    friendship.user_idStringID
    friendship.friend_idStringFriend ID
    friendship.statusStringStatus
    friendship.userObjectMy Information
    friendship.friendObjectFriend information
    friendship.requested_atStringRequest date

    Failed

    {
        "status": -1,
        "message": "Error message"
    }
    
    AttributeTypeDescription
    codeIntResult (1: success, refer to the error code in case of failure)
    errorStringError message

    End friendship

    You can break off friendships with other users. If you end a friendship with a user, the user will be removed from the list of your friends. In the case you wish to restore friendship, you can make a new friendship request to the user.

    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",
    }
    
    HeaderTypeRequiredDescription
    X-API-KEYStringOAuthentication key issued by GAMEPOT
    X-PROJECT-IDStringODashboard project ID
    AttributeTypeRequiredDescription
    userIdStringOUser ID
    friendIdStringOAdd friend ID

    Response

    Succeeded

    {
       "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"
        }
    }
    
    AttributeTypeDescription
    friendship.project_idStringProject ID
    friendship.idStringInput ID
    friendship.statusStringStatus
    friendship.user_idStringID
    friendship.friend_idStringFriend ID
    friendship.userObjectMy Information
    friendship.friendObjectFriend information
    friendship.requested_atStringRequest date

    Failed

    {
        "status": -1,
        "message": "Error message"
    }
    
    AttributeTypeDescription
    codeIntResult (1: success, refer to the error code in case of failure)
    errorStringError message

    Friend list

    You can see the current list of your friends.

    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'
    
    HeaderTypeRequiredDescription
    X-API-KEYStringOAuthentication key issued by GAMEPOT
    X-PROJECT-IDStringODashboard project ID
    AttributeTypeRequiredDescription
    filterStringOSearch is available for all fields of a query through filtering.
    user_idStringOUser ID

    ** Filter can be useful depending on codes.
    You can search through the list of friends with status codes.

    "accepted": the list of users who accepted my friend request
    "rejected": the list of users who rejected my friend request
    "requested": the list of users to whom I sent a friend request
    "pending": the list of users who received my friend requests

    Response

    Succeeded

    [
        {
            "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"
        }
    ]
    
    AttributeTypeDescription
    project_idStringProject ID
    idStringUnique ID
    statusStringStatus
    user_idStringID
    friend_idStringFriend ID
    userObjectMy Information
    friendObjectFriend information
    created_atStringCreation date
    updated_atStringUpdated date
    requested_atStringRequest date

    Failed

    {
        "status": -1,
        "message": "Error message"
    }
    
    AttributeTypeDescription
    codeIntResult (1: success, refer to the error code in case of failure)
    errorStringError message

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.