API v1 PUT Follow - SpaceFlow/Backend GitHub Wiki

PUT /v1/follow/:userid

Follow a user

Required scope: follow_from_user

Authorisation needed: yup

Potential Errors:

Error Code HTTP Status Code Description
APP_ID_NOT_FOUND 400 The API Server couldn't find the to the token associated application id
REQUIRED_SCOPE_NOT_SET 400 The token wasn't created with the scope required for this endpoint
TOKEN_NOT_FOUND 400 An invalid token was supplied in the authorisation header
AUTHORISATION_HEADER_NOT_PRESENT 400 should be self-explanatory

Example:

PUT https://api.spaceflow.io/v1/follow/133742069

Returns:

{
    "unfollow": false,
    "starter_user": user object of yourself,
    "using_app": {
    "id": 1337, 
    "app_name": "nicememeapp",
    "target_user": user object of the user you followed,
    "timestamp": numeric unix timestamp,
    "error": null
}