create By User Id
fun Friendships.createByUserId( userId: Long, follow: Boolean? = null, vararg options: Option): JsonObjectApiAction<User>
Content copied to clipboard
Allows the authenticating user to follow (friend) the user specified in the ID parameter. Returns the followed user when successful. Returns a string describing the failure condition when unsuccessful. If the user is already friends with the user a HTTP 403 may be returned, though for performance reasons this method may also return a HTTP 200 OK message even if the follow relationship already exists. Actions taken in this method are asynchronous. Changes will be eventually consistent.
Receiver
Friendships endpoint instance.
Return
JsonObjectApiAction for User model.
See also
Parameters
user Id
The ID of the user to follow.
follow
Enable notifications for the target user.
options
Optional. Custom parameters of this request.