Skip to content
Revadike edited this page Oct 16, 2026 · 1 revision

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: POST

Host: steamcommunity.com

Path: /actions/AddFriendAjax

Form Data:

Name Type Required Description
sessionid string Yes The value of the sessionid cookie
steamid string Yes The 64-bit SteamID of the user to send the friend request to
accept_invite number No Set to 1 to accept an incoming friend request, or 0 to send a new friend invite (default)

Response

200 OK

Name Type Description
success boolean 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 steamid field is omitted, the server responds 400 with the bare JSON body false.

Example

POST https://steamcommunity.com/actions/AddFriendAjax { sessionid: "a0b1c2d3e4f5g6h7i8j9klmn" }
false

Clone this wiki locally