Developers » API methods » Friends » friends.areFriends
Checks the current user's friendship status with other specified users.
Also returns information specifying whether there is an outgoing or incoming friend request (new follower).
This method can be called with a user token. Access rights required: friends.
user_idsIDs of the users whose friendship status to check.
list of comma-separated numbers, required parameter, the maximum number of elements allowed is 1000
need_sign1 to return sign field where sign is:

where id is current user ID. This field allows to check that data has not been modified by the client.

By default: 0.
flag, either 1 or 0
extended1 is_request_unread needs to be returned if theres an unread friend request.
flag, either 1 or 0
Returns an array of status objects with the following fields:
  • user_id user id (from those passed in the user_ids parameter);
  • friend_status friendship status with the user:
    • 0 the user is not a friend;
    • 1 a friend request was sent to the user;
    • 2 there is an incoming friend request from the user;
    • 3 the user is a friend.
  • is_request_unread whether or not theres an unread friend request from a user (true if there is, false or none if theres no friend request), only returned if passing the parameters extended and friend_status = 2

Global errors can occur while running. See their descriptions on this page.
Version historyShow all
New extended parameter was added for method to return additional information about the user or community that placed the post.
Method friends.areFriends was updated, sign field generation algorithm was changed: user id is added to id.
Note object presentation was fixed for newsfeed.get and newsfeed.getRecommeded: id and comments are returned now.