API Endpoints

validate

The validate endpoint can be used to check the validity of an email address or username. Both syntax and duplication are checked. This allows the app to verify username and email address before it tries to register a user. The endpoint is quick, therefore it is probably Ok to check as each character is typed.

Method Description
/email/validate?value=EMAIL checks email for correct syntax and duplication, returns success/error
/username/validate?value=USERNAME checks username for correct syntax, length(16 characters max), and duplication, returns success/error

Example1: email/validate?value=EMAIL -- valid email example

GET http://api.hipgeo.com/email/validate?value=john_doe@yahoo.com

Returns:
{
  "email":"john_doe@yahoo.com",
  "result":"success"
} 
Error Code Possible Errors
400
  1. Nothing to validate
  2. Email address is required
  3. Not a valid email address
  4. anything@hipgeo.com is invalid
  5. Email is too long
  6. This email is already used

Example2: email/validate?value=EMAIL -- invalid email example

GET http://api.hipgeo.com/email/validate?value=john&doe@yahoo.com

Returns:
{
  "request":"http:\/\/api.hipgeo.com\/email\/validate?value=john&doe@yahoo.com",
  "result":"error",
  "details":"Not a valid e-mail address."
}  
Error Code Possible Errors
400
  1. Nothing to validate
  2. Email address is required
  3. Not a valid email address
  4. anything@hipgeo.com is invalid
  5. Email is too long
  6. This email is already used

Example3: username/validate?value=USERNAME -- valid username example

GET http://api.hipgeo.com/username/validate?value=john2000&access_token=TOKENVALUE

Returns:
{
  "username":"john2000",
  "result":"success"
} 
Error Code Possible Errors
400
  1. Nothing to validate
  2. Sorry, this user name is taken
  3. HipGeo is not allowed in names
  4. Spaces are not allowed in names
  5. Only letters and numbers
  6. Must contain a letter

Example4: username/validate?value=[username] -- duplicate username example

GET http://api.hipgeo.com/username/validate?value=scott&access_token=TOKENVALUE

Returns:
{
  "request":"http:\/\/api.hipgeo.com\/username\/validate?value=gerard&access_token=TOKENVALUE",
  "result":"error",
  "details":"Sorry, this user name is taken"
} 
Error Code Possible Errors
400
  1. Nothing to validate
  2. Sorry, this user name is taken
  3. HipGeo is not allowed in names
  4. Spaces are not allowed in names
  5. Only letters and numbers
  6. Must contain a letter
HipGeo Icon