API:POST /activate

From SoFurry
Revision as of 12:50, 25 April 2016 by Tetsudra (talk | contribs) (Response: Failed Login)
Jump to: navigation, search

Resource URL

https://api.sofurrybeta.com/activate

Request

POST /activate
{
  "activate_token": "abcd1234" # Required, 8 characters
}

Response: Success

HTTP 200
{
  "result": true,
  "token": "Activated! Go ahead and log in."
}

If the result is TRUE, then the activation was a success. The corresponding user will now be able to log in with their username and password.

Response: Failed Validation

Examples of the failure response messages you'll see.

HTTP 422
{
  "activate_token": [
    "The activate token field is required."
  ]
}
HTTP 422
{
  "activate_token": [
    "The activate token must be 8 characters."
  ]
}
HTTP 422
{
  "activate_token": [
    "The selected activate token is invalid."
  ]
}