# Get user friends Gets a list of users added as friends of the authenticated user. Endpoint: GET /users/me/relationships Version: v1 Security: Bearer, APIKey ## Query parameters: - `after` (string) Parameter that is used for API pagination. - `limit` (integer) Maximum number of users that are returned at a time. - `type` (string, required) Friends type. Can be: * friends to get the list of the users added to the friend list * friend_requested to get the list of the users to who got the friend request * friend_requested_by to get the list of the users from who sent a friend request * blocked to get the list of the users added to the friend list, but blocked * blocked_by to get the list of the users who blocked this user Enum: "friends", "friend_requested", "friend_requested_by", "blocked", "blocked_by" - `sort_by` (string, required) Condition for sorting the users. Can be: * by_nickname to sort the list alphabetically by the nickname * by_updated to sort the list by the date when users recently added someone to their friend list or blocked them Enum: "by_nickname", "by_updated" - `sort_order` (string, required) Condition for sorting the list of users. Can be: * asc to apply the sort_by value in ascending order * desc to apply the sort_by value in descending order Enum: "asc", "desc" ## Response 200 fields (application/json): - `next_after` (string, required) Value of the after parameter that should be passed while requesting this call for the next time. - `next_url` (string, required) URL of the request for using this call for the next time. - `relationships` (array, required) Friends details. Example: [{"next_after":"bmFtZS0ydXNlci0y","next_url":"https://login.xsolla.com/api/users/by_access_key/access-key-1/relationships?type=friend_requests&sort_by=by_name&limit=2&after=bmFtZS0ydXNlci0y","relationships":[{"status_incoming":"none","status_outgoing":"friend_requested","updated":1494499214.3501,"user":{"id":"user-3","name":"name-3","nickname":"nick-2","picture":"","tag":"423432"}},{"status_incoming":"none","status_outgoing":"friend_requested","updated":1494499213.4718,"user":{"id":"user-2","name":"name-2","nickname":"nick-2","picture":"","tag":"3100"}}]}] - `relationships.status_incoming` (string, required) Type of the user. Can be: * none if there is no action initiated for the user * friend if the user is in the friend list of the requested one * friend_requested if the friend request is sent to the user by the requested one * blocked if the user is blocked by the requested one - `relationships.status_outgoing` (string, required) Type of the requested user. Can be: * none if there is no action initiated for the user * friend if the user is in the friend list of the one with the specified JWT * friend_requested if the friend request is sent to the user by the one with the specified JWT * blocked if the user is blocked by the one with the specified JWT - `relationships.updated` (number) Time passed since the latest action of adding a friend to the friend list or banning them in seconds. - `relationships.user` (object, required) User details. - `relationships.user.id` (string, required) User ID. - `relationships.user.name` (string,null, required) User name in a social network. - `relationships.user.nickname` (string,null, required) User nickname. - `relationships.user.picture` (string,null, required) Link to the user profile picture. - `relationships.user.tag` (string,null, required) User tag without "#" at the beginning. Can have no unique value and can be used in the [Search users by nickname](https://developers.xsolla.com/api/login/operation/search-users-by-nickname) call. ## Response 400 fields (application/json): - `error` (object, required) - `error.code` (string, required) Error code. Example: "003-061" - `error.description` (string, required) Error description. Example: "Object not found." - `error.details` (object) Additional information. ## Response 401 fields (application/json): - `error` (object, required) - `error.code` (string, required) Error code. Example: "003-061" - `error.description` (string, required) Error description. Example: "Object not found." - `error.details` (object) Additional information. ## Response 403 fields (application/json): - `error` (object, required) - `error.code` (string, required) Error code. Example: "003-061" - `error.description` (string, required) Error description. Example: "Object not found." - `error.details` (object) Additional information. ## Response 404 fields (application/json): - `error` (object, required) - `error.code` (string, required) Error code. Example: "003-061" - `error.description` (string, required) Error description. Example: "Object not found." - `error.details` (object) Additional information.