Add Friend - Revadike/InternalSteamWebAPI GitHub Wiki
POST /actions/AddFriendAjax
Sends a friend request to another user, or accepts an incoming friend request.
Rate limits
No known rate limit
Request
Authenticated: Yes
Method:
POSTHost:
steamcommunity.comPath:
/actions/AddFriendAjaxForm Data:
Name Type Required Description sessionidstring Yes The value of the sessionidcookiesteamidstring Yes The 64-bit SteamID of the user to send the friend request to accept_invitenumber No Set to 1to accept an incoming friend request, or0to send a new friend invite (default)
Response
200 OK
Name Type Description successboolean Whether the request was successful
400 Bad Request
Name Type Description failed_invites_result[]number Array of failure codes; failed_invites_result[0]is why the invite failed:25(your friends list is full),15(their friends list is full),40(communication with the user is blocked),11(you are blocking the user),84(too many invites sent recently),24(your account is limited)
When the required
steamidfield is omitted, the server responds400with the bare JSON bodyfalse.
Example
POST https://steamcommunity.com/actions/AddFriendAjax { sessionid: "a0b1c2d3e4f5g6h7i8j9klmn" }
false