friends_add_friend
This endpoint is used to send a BuddyPress friend request. `force_accept` can be included whether to force acceptance. When true, this endpoint will result in an accepted friendship, with no notifications being sent.
Resource URL
http://localhost/api/userplus/friends_add_friend/
Method
POST
Required Parameters
- cookie
- friend_id - ID of the "friend" user (the user whose friendship is being requested).
- key – get API key from Settings > User Plus
Optional Parameters
- force_accept - Whether to force acceptance. When true, this endpoint will result in an accepted friendship, with no notifications being sent. Default: false.
Sample Request URL
http://localhost/api/userplus/friends_add_friend/?key=KEY-HERE&cookie=Cookie-here&friend_id=1
Related Endpoints
- friends
- friends_accept_friendship
- friends_check_friendship
- friends_count_invitable_friends
- friends_friend_count
- friends_friend_count_for_user
- friends_friend_ids