Difference between revisions of "API:POST /activate"
(→Response: Failed Login) |
(→Response: Failed Validation) |
||
Line 23: | Line 23: | ||
Examples of the failure response messages you'll see. | Examples of the failure response messages you'll see. | ||
+ | |||
+ | If the activate_token field is not supplied: | ||
HTTP 422 | HTTP 422 | ||
Line 30: | Line 32: | ||
] | ] | ||
} | } | ||
+ | |||
+ | If the token is too short or too long: | ||
HTTP 422 | HTTP 422 | ||
Line 37: | Line 41: | ||
] | ] | ||
} | } | ||
+ | |||
+ | If the token cannot be identified in the database - note that once a token is used, it's cleared: | ||
HTTP 422 | HTTP 422 |
Latest revision as of 12:50, 25 April 2016
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.
If the activate_token field is not supplied:
HTTP 422 { "activate_token": [ "The activate token field is required." ] }
If the token is too short or too long:
HTTP 422 { "activate_token": [ "The activate token must be 8 characters." ] }
If the token cannot be identified in the database - note that once a token is used, it's cleared:
HTTP 422 { "activate_token": [ "The selected activate token is invalid." ] }