everydayhero: Developer

Custom Authentication Integration

Create a new user / Sign in

Authentication types: Public OAuth Client ID (Partner permissions)

POST https://everydayhero.com/api/v2/authentication/sign_up

Using this API you have to ensure that users have agreed to the everydayhero Terms of Service (AU, NZ, US, UK, IE).

Payload

user[name] : required string
The name of the new user.

user[email] : required string
The email of the new user.

user[password] : required string
The password of the new user.

user[phone] : required string
The phone number of the new user.

country : required string
The region of the new user, valid regions: AU, NZ, UK, US, IE.

client_id: required integer
The client ID of the OAuth application.

The response will either be 201, 422 or a 404.

If the response is successful, the response will include a user OAuth token, along with the user_id. This can be used with the user endpoint to fetch the user details.

Response

Success:

{
  "token": "abc",
  "user_id": 123
}

If the request failures, a hash of errors will be returned. If the user tries to sign up with an existing email, the API will respond with a success if the provided password matches, if not, a 422 with an related error will be returned. A 404 will be returned if a country, or client_id is mising.

Failure:

{
  "error": {
    "message": "Validation failed",
    "errors": [
      {
        "field": "email",
        "code": "invalid"
      }
    ]
  }
}

Authenticate a user / Login

Authentication types: Public OAuth Client ID

POST https://everydayhero.com/api/v2/authentication/sign_in

Payload

user[email] : required string
The email of the user.

user[password] : required string
The password of the user.

client_id: required integer
The client ID of the OAuth application.

The response will either be 200 or 404.

If the response is successful, the response will include a user OAuth token, along with the user_id. This can be used with the user endpoint to fetch the user details. The response will be a 404 if the user details are incorrect, or the client_id is missing.

Response

Success:

{
  "token": "abc",
  "user_id": 123
}

Reset a user password

Authentication types: Public OAuth Client ID

This API endpoint will trigger a password reset email for the specified user.

POST https://everydayhero.com/api/v2/authentication/reset_password

Payload

email : required string
The email of the user.

client_id: required string
The client ID of the OAuth application.

The response will either be 204 or 404.

If the response is successful, the response will be a 204 no-content. The response will be a 404 if the user email is invalid, or the client_id is missing.

Single Sign On to Everydayhero

See OAuth Integration