Authentication & Registration
Overview
Use the authentication APIs to manage user authentication and sessions.
1 Register a User
Endpoint: POST /register
Description: Registers a user with an email and account type (Handler or Trainer). A verification email is sent.
Request Headers:
X-API-Key: your_api_key
Content-Type: application/json
Request Body (JSON):
Response (201 Created):
{
"message": "User registered successfully. Verification email sent."
}
Errors (422 Unprocessable Entity):
{
"errors": {
"email": ["The email has already been taken."]
}
}
2 Verify Email
Endpoint: GET /verify-email/{token}
Description: Confirms the user's email and returns an authentication token.
Request Headers:
X-API-Key: your_api_key
Accept: application/json
Response (200 OK):
{
"message": "Email verified successfully.",
"access_token": "53|FAkxFNFNsxJE6B6Oh00QrlAhcBEJA1L0rytWBEaN62e71d61",
"token_type": "Bearer",
"user": {
"id": 32,
"email": "
[email protected]",
"email_verified_at": "2025-03-12T14:53:13.000000Z",
"sds_agreement_expires_at": null,
"email_verified": true,
"registration_status": {
"registrationFinished": false,
"profileFieldsFilled": false,
"animalAdded": false,
"emergencyContactAdded": false,
"profileCompletionPercentage": 0,
"overallCompletionPercentage": 0,
"sdsAgreementValid": false,
"sdsExpirationDate": null
},
"first_password_set": false,
"account_type": "handler",
"registration_type": null,
"two_factor_confirmed_at": null,
"current_team_id": null,
"created_at": "2025-03-12T14:52:43.000000Z",
"updated_at": "2025-03-12T14:53:13.000000Z",
"first_name": null,
"middle_name": null,
"last_name": null,
"relationship_to_handler": null,
"gender": null,
"date_of_birth": null,
"primary_phone": null,
"secondary_phone": null,
"alternate_email": null,
"mailing_address": null,
"mailing_address_2": null,
"city": null,
"state": null,
"zip": null,
"ethnicity": [],
"education_level": null,
"annual_income": null,
"military_service": null,
"wartime_contractor": null,
"service_dog_for_injury": null,
"full_name": "",
"profile_photo_url": null
}
}
Errors (400 Bad Request):
{
"message": "Invalid or expired token."
}
3 Set Password
Endpoint: PUT /set-password
Description: Sets a new password for the user. Requires Bearer Token for authentication.
Request Headers:
Authorization: Bearer your_generated_token
X-API-Key: your_api_key
Content-Type: application/json
Request Body (JSON):
{
"password": "securepassword",
"password_confirmation": "securepassword"
}
Response (200 OK):
{
"message": "Password set successfully."
}
Errors (422 Unprocessable Entity):
{
"errors": {
"password": ["The password must be at least 8 characters."]
}
}
4 User Login
Endpoint: POST /login
Description: Authenticates the user and returns a Bearer Token.
Request Headers:
X-API-Key: your_api_key
Content-Type: application/json
Request Body (JSON):
Response (200 OK):
{
"message": "Login successful",
"access_token": "54|VPMAJRotap8OHOHv18Hk3qaCDd0IeoXjBqDKXi2e436138a3",
"token_type": "Bearer",
"user": {
"id": 32,
"email": "
[email protected]",
"email_verified_at": "2025-03-12T14:53:13.000000Z",
"sds_agreement_expires_at": "2028-03-12T14:56:54.000000Z",
"email_verified": true,
"registration_status": {
"registrationFinished": true,
"profileFieldsFilled": true,
"animalAdded": true,
"emergencyContactAdded": true,
"profileCompletionPercentage": 80,
"overallCompletionPercentage": 93,
"sdsAgreementValid": true,
"sdsExpirationDate": "2028-03-12"
},
"first_password_set": false,
"account_type": "handler",
"registration_type": null,
"two_factor_confirmed_at": null,
"current_team_id": null,
"created_at": "2025-03-12T14:52:43.000000Z",
"updated_at": "2025-03-12T15:03:36.000000Z",
"first_name": "John",
"middle_name": "David",
"last_name": "Smith",
"relationship_to_handler": null,
"gender": "male",
"date_of_birth": "1984-11-01T00:00:00.000000Z",
"primary_phone": "094-554-4354",
"secondary_phone": null,
"alternate_email": null,
"mailing_address": "My mailing address",
"mailing_address_2": null,
"city": "New York",
"state": "AR",
"zip": "61001",
"ethnicity": [
"white",
"hispanic"
],
"education_level": null,
"annual_income": null,
"military_service": null,
"wartime_contractor": null,
"service_dog_for_injury": null,
"full_name": "John David Smith",
"profile_photo_url": null
}
}
Errors (401 Unauthorized):
{
"message": "Invalid email or password"
}
Errors (403 Forbidden - Email Not Verified):
{
"message": "Email not verified. Please verify your email before logging in."
}
5 User Logout
Endpoint: POST /logout
Description: Logs out the user and revokes the authentication token.
Request Headers:
Authorization: Bearer your_generated_token
X-API-Key: your_api_key
Accept: application/json
Response (200 OK):
{
"message": "Logged out successfully."
}
6 Terms and conditions
Endpoint: GET /terms
Description: Get terms and conditions content.
Request Headers:
Authorization: Bearer your_generated_token
X-API-Key: your_api_key
Accept: application/json
Response (200 OK):
{
"success": true,
"message": "Data retrieved successfully",
"data": {
"title": "In order to continue, you must accept the following…",
"main_content": "\n <ul>\n <li>I am at least 18 years of age.</li>\n <li>I am enrolling myself. If I am enrolling for someone else I have their permission to do so.</li>\n <li>I agree that I will not intentionally or unintentionally violate any applicable local, state, national or international law, including but not limited to the Americans with Disabilities Act and its implementing regulations.</li>\n <li>I understand that it is against the law to intentionally misrepresent an animal as a Service or Assistance Dog.</li>\n <li>I, or the person being enrolled, has a qualifying disability.</li>\n <li>This dog is either a fully trained Service or Assistance Dog, or is in the process of being trained to help perform specific tasks related to the owner’s disability. Please note that not all states recognize Service or Assistance Dogs in Training. I understand that it is my responsibility to understand and obey all applicable laws in my area.</li>\n <li>I understand that membership is not a substitute for proper training.</li>\n <li>I understand that aggressive behavior constitutes an immediate forfeiture of membership.</li>\n <li>I understand that misrepresenting myself or my service animal, behaving in an unbecoming manner, misquoting the law or the purpose of our service can result in immediate forfeiture of membership.</li>\n <li>I will do my very best to leave an excellent impression with others with my behavior and that of my Service Dog.</li>\n </ul>\n ",
"info_title": "Terms of Service",
"info_content": "<ol><li><h3>ACCEPTANCE OF TERMS OF SERVICE</h3></li><li>Service Dog Standards or referred to here as “SDS”) warmly welcomes you. SDS has been created as a benefit to Service and Assistance Dog owners or handlers living or residing in the United States. SDS provides Services (defined below) to you subject to the following Terms and Conditions or Terms of Service (\"TOS\"), which may be updated by us from time to time without notice to you. By accessing and using this Website or Services you accept and agree to be bound by the terms and provision of the TOS. In addition, if you choose to use Identification Materials with references to SDS (regardless of their source, i.e. either made by you or purchased from a third party), use any of Materials we sell or provide on our website (including, but not limited to Membership Cards, Certificates, Patches, Animal Tags, etc.), refer to SDS in any way online or offline, you accept and agree to be bound by the terms and provision of the TOS. All such terms, guidelines or rules (including but not limited to our Privacy Policy) are hereby incorporated by reference into the TOS. All information in SDS, including but not limited to, data and information provided by users and registrants, information provided by SDS both in online form and offline form, shall hereby referred to as Content.</li></ol><p><br></p>"
}
}
7 Valid documents
Endpoint: get /valid
Description: Get valid documents content.
Request Headers:
Authorization: Bearer your_generated_token
X-API-Key: your_api_key
Accept: application/json
Response (200 OK):
{
"title": "Valid documents",
"content": "<p>Valid U.S. passport book or passport card</p>\r\n<p>Valid driver`s license or REAL ID compliant driver`s license</p>\r\n<h3>OTHER FORMS OF SECONDARY IDENTIFICATION</h3>\r\n<ul>\r\n <li>Government or state issued ID</li>\r\n <li>Government employee ID (city, county, state, or federal)</li>\r\n <li>Trusted Traveler IDs (including valid Global Entry, FAST, SENTRI, and NEXUS cards)</li>\r\n <li>Certificate of Naturalization</li>\r\n <li>Certificate of Citizenship</li>\r\n <li>U.S. military or military dependent ID</li>\r\n <li>Current (valid) foreign passport</li>\r\n <li>Enhanced Tribal Cards and Native American tribal photo IDs</li>\r\n</ul>\r\n<h3>IF HANDLER IS UNDER 18</h3>\r\n<ul>\r\n <li>Valid driving learner's permit with photo</li>\r\n <li>Valid non-driver ID with photo</li>\r\n <li>Temporary driver's license with photo</li>\r\n <li>U.S. Permanent Resident Card (Green Card) - commonly used by a parent of a U.S. citizen child applicant</li>\r\n <li>Current school ID with photo</li>\r\n <li>Birth certificate</li>\r\n <li>Airline boarding pass (for traveling same-day)</li>\r\n\r\n</ul>"
}
8 Social login redirect links
Endpoint: get /auth-social
Description: Get redirect links for social networks login. This method allows you to get all possible links for redirection, through which it is possible to get links to the login in the desired social network.
Request Headers:
X-API-Key: your_api_key
Accept: application/json
Request Body (JSON):
{
"account_type":"handler"
}
Response (200 OK):
{
"providers": {
"items": [
{
"name": "google",
"label": "Google",
"redirect_url": "https://servicedog.biz/api/v1/auth-social/google/redirect",
"login_url": null
},
{
"name": "facebook",
"label": "Facebook",
"redirect_url": "https://servicedog.biz/api/v1/auth-social/facebook/redirect",
"login_url": null
},
{
"name": "apple",
"label": "Apple",
"redirect_url": "https://servicedog.biz/api/v1/auth-social/apple/redirect",
"login_url": null
}
],
"messages": []
}
}
9 Get the login url for selected redirect link
Endpoint: get /auth-social/{provider}/redirect
Description: Get login link for social networks login. Provider can be "google", "facebook", "apple" etc
Request Headers:
X-API-Key: your_api_key
Accept: application/json
Request Body (JSON):
{
"account_type":"handler"
}
Response (200 OK):
{
"redirect_url": "https://accounts.google.com/o/oauth2/auth?client_id=779349047651-npcdh2p0s88jaaue9ifbnvoubjad83ee.apps.googleusercontent.com&redirect_uri=https%3A%2F%2Fservicedog.biz%2Fapi%2Fv1%2Fauth-social%2Fgoogle%2Fcallback&scope=openid+profile+email&response_type=code&state=eyJhY2NvdW50X3R5cGUiOiJoYW5kbGVyIiwidGVuYW50X2tleSI6ImRlZmF1bHQiLCJ0ZW5hbnRfYXBpX2tleSI6IjEyMzQ1Njc4OSJ9"
}
10 Social login callback method (for providers)
Endpoint: get /auth-social/{provider}/callback
Description: This method creates a new user and logs him in, or logs him in if the user already exists. This method is intended for use by the provider for social login, not for the frontend. Provider can be "google", "facebook", "apple" etc
Request Headers:
X-API-Key: your_api_key
Accept: application/json
Example request
https://accounts.google.com/o/oauth2/auth?client_id=779349047651-npcdh2p0s88jaaue9ifbnvoubjad83ee.apps.googleusercontent.com&redirect_uri=https%3A%2F%2Fservicedog.biz%2Fapi%2Fv1%2Fauth-social%2Fgoogle%2Fcallback&scope=openid+profile+email&response_type=code&state=eyJhY2NvdW50X3R5cGUiOiJoYW5kbGVyIiwidGVuYW50X2tleSI6ImRlZmF1bHQiLCJ0ZW5hbnRfYXBpX2tleSI6IjEyMzQ1Njc4OSJ9
Response (200 OK):
{
"message":"Social login successful",
"access_token":"39|MWiFE9GHb3rZtmH6gZXf6eAHn4xthbKNCImju4Oreb77aaa6",
"token_type":"Bearer",
"user":{
"id":18,
"email":"
[email protected]",
"email_verified_at":"2025-03-04T09:15:45.000000Z",
"email_verified":false,
"account_type":"handler",
"registration_type":"myself",
"two_factor_confirmed_at":null,
"current_team_id":null,
"created_at":"2025-03-04T09:15:45.000000Z",
"updated_at":"2025-03-04T09:15:45.000000Z",
"first_name":"John",
"middle_name":null,
"last_name":"Doe",
"relationship_to_handler":null,
"gender":null,
"date_of_birth":null,
"primary_phone":null,
"secondary_phone":null,
"alternate_email":null,
"mailing_address":null,
"mailing_address_2":null,
"city":null,
"state":null,
"zip":null,
"ethnicity":[
],
"first_password_set": false,
"education_level":null,
"annual_income":null,
"military_service":null,
"wartime_contractor":null,
"service_dog_for_injury":null,
"full_name":"John Doe",
"profile_photo_url":"https:\/\/servicedog.biz\/storage\/profile-photos\/jn2Q8aSrtQE3p6m3QgIuKgxC2PaJsb0ALLBmPXRg.jpg"
}
}
11 Get all login links in one method
Endpoint: get /auth-social/links
Description: Get all available login links for social networks login. If you do not pass the account_type parameter at all, there will only be an attempt to login and not to register.
Request Headers:
X-API-Key: your_api_key
Accept: application/json
Request Body (JSON):
{
"account_type":"handler"
}
Response (200 OK):
{
"providers": {
"items": [
{
"name": "google",
"label": "Google",
"redirect_url": "https://servicedog.biz/api/v1/auth-social/google/redirect",
"login_url": "https://accounts.google.com/o/oauth2/auth?client_id=779349047651-npcdh2p0s88jaaue9ifbnvoubjad83ee.apps.googleusercontent.com&redirect_uri=https%3A%2F%2Fservicedog.biz%2Fapi%2Fv1%2Fauth-social%2Fgoogle%2Fcallback&scope=openid+profile+email&response_type=code&state=eyJhY2NvdW50X3R5cGUiOiJoYW5kbGVyIiwidGVuYW50X2tleSI6ImRlZmF1bHQiLCJ0ZW5hbnRfYXBpX2tleSI6IjEyMzQ1Njc4OSJ9"
},
{
"name": "facebook",
"label": "Facebook",
"redirect_url": "https://servicedog.biz/api/v1/auth-social/facebook/redirect",
"login_url": "https://www.facebook.com/v3.3/dialog/oauth?client_id=your-facebook-client-id&redirect_uri=https%3A%2F%2Fservicedog.biz%2Fapi%2Fv1%2Fauth-social%2Ffacebook%2Fcallback&scope=email&response_type=code&state=eyJhY2NvdW50X3R5cGUiOiJoYW5kbGVyIiwidGVuYW50X2tleSI6ImRlZmF1bHQiLCJ0ZW5hbnRfYXBpX2tleSI6IjEyMzQ1Njc4OSJ9"
},
{
"name": "apple",
"label": "Apple",
"redirect_url": "https://servicedog.biz/api/v1/auth-social/apple/redirect",
"login_url": "https://appleid.apple.com/auth/authorize?client_id=your-apple-client-id&redirect_uri=https%3A%2F%2Fservicedog.biz%2Fapi%2Fv1%2Fauth-social%2Fapple%2Fcallback&scope=name%20email&response_type=code&response_mode=form_post&state=eyJhY2NvdW50X3R5cGUiOiJoYW5kbGVyIiwidGVuYW50X2tleSI6ImRlZmF1bHQiLCJ0ZW5hbnRfYXBpX2tleSI6IjEyMzQ1Njc4OSJ9"
}
],
"messages": []
}
}
12 Set registration step for user
Endpoint: POST /api/v1/register/{step}
Description: Set registration step wich was completed.
Request Headers:
X-API-Key: your_api_key
Accept: application/json
Authorization: Bearer your_token_from_previous_steps
Request Body (JSON):
{}
Response (200 OK):
{
"success": true,
"message": "Data retrieved successfully",
"data": {
"user": {
"id": 13,
"full_name": "",
"phone": null,
"email": "
[email protected]",
"account_type": "handler",
"registration_step": "{step_from_query}",
"profile_photo_url": null
}
}
}
30 September 2025