Authentication

REQUIREMENT
The base URL for all API requests is https://api.otterwaiver.com

Authenticate

This endpoint is designed to ensure that only authorized devices can connect to the digital waiver and participant management software. The endpoint creaters an access token which is required to authorize requests to all other endpoints

 POST /auth/connect
  {
      "client_id": "1baf8ecf-78a8-44d2-9272-3693b968f8e1",
      "client_secret": "0ZC7/IuH9aTN146i/CXZmEET5HtXTwiQCm9/1Nxr4MXc23S8KbUWkFs2gRihxyGA",
      "grant_type": "client_credentials",
      "scope": "api"
  }
 curl --location --request POST 'https://api.otterwaiver.com/auth/connect' \
      --header 'Content-Type: application/json' \
      --data-raw '{
      "client_id": "1baf8ecf-78a8-44d2-9272-3693b968f8e1",
      "client_secret": "0ZC7/IuH9aTN146i/CXZmEET5HtXTwiQCm9/1Nxr4MXc23S8KbUWkFs2gRihxyGA",
      "grant_type": "client_credentials",
      "scope": "api"
      }'
  {
      "account": {
          "id": "1baf8ecf-78a8-44d2-9272-3693b968f8e1",
          "firstName": "Nana Quame",
          "lastName": "Alexander",
          "bio": null,
          "emailMatch": "quamelexiz@gmail.com",
          "email": "quamelexiz@gmail.com",
          "authyId": "408035354",
          "emailVerified": false,
          "sendPromoEmails": null,
          "profileCompleted": true,
          "provider": "google",
          "providerId": "102049908154904320071",
          "deviceID": null,
          "photoURL": "https://lh3.googleusercontent.com/a-/AOh14GihMWI8AT7aS3JFuAdT-o8HrWwnPvximVlfCFHPCA=s96-c",
          "waiverName": null,
          "gender": null,
          "idCountry": null,
          "idType": null,
          "idNum": null,
          "idState": null,
          "address1": null,
          "address2": null,
          "city": null,
          "state": null,
          "zip": null,
          "checkin_time": null,
          "waiverSignedStatus": false,
          "locale": "en",
          "phone": "+233556608317",
          "country_code": "233",
          "isFirstTime": false,
          "isSignUpComplete": true,
          "consent": false,
          "dob": null,
          "createdAt": "2022-01-11T14:50:25.751Z",
          "lastUpdatedAt": "2022-01-13T11:45:36.030Z",
          "organizationId": null,
          "status": "ACTIVE",
          "createdById": "eece86d4-f918-4822-974c-cc62008f3f52",
          "sports": [
              {
                  "label": "Yoga",
                  "value": "CAT_YGS"
              },
              {
                  "label": "Anusara",
                  "value": "YGS_ANUS"
              },
              {
                  "label": "Ashtanga",
                  "value": "YGS_ASHT"
              },
              {
                  "label": "Bikram",
                  "value": "YGS_BIKR"
              },
              {
                  "label": "Hatha",
                  "value": "YGS_HATH"
              },
              {
                  "label": "Hot Yoga",
                  "value": "YGS_HOT"
              },
              {
                  "label": "Iyenger",
                  "value": "YGS_IYEN"
              },
              {
                  "label": "Vinyasa",
                  "value": "YGS_VINY"
              },
              {
                  "label": "Aerial Yoga",
                  "value": "YGS_AERI"
              },
              {
                  "label": "Acro Yoga",
                  "value": "YGS_ACRO"
              }
          ],
          "role": {
              "label": "Organization Admin",
              "value": "ORGANIZATION_ADMIN"
          },
          "refreshToken": "e8ebb040-faf9-4ab6-a40a-34ead88a5775",
          "permission": [
              {
                  "show": true,
                  "access": {
                      "create": true,
                      "delete": true,
                      "update": true
                  },
                  "module": "billingInfo",
                  "features": [],
                  "description": "Billing information on organization page"
              },
              {
                  "show": true,
                  "access": {
                      "create": true,
                      "delete": true,
                      "update": true
                  },
                  "module": "planInfo",
                  "features": [],
                  "description": "Plan information"
              },
              {
                  "show": true,
                  "access": {
                      "create": true,
                      "delete": true,
                      "update": true
                  },
                  "module": "cardManagement",
                  "features": [],
                  "description": "Credit Card Management"
              },
              {
                  "show": true,
                  "access": {
                      "create": true,
                      "delete": true,
                      "update": true
                  },
                  "module": "buyCredits",
                  "features": [],
                  "description": "Buy Credit Management"
              },
              {
                  "show": true,
                  "access": {
                      "create": true,
                      "delete": true,
                      "update": true
                  },
                  "module": "userManagement",
                  "features": [
                      {
                          "name": "resetPassword",
                          "enabled": true
                      }
                  ],
                  "description": "User invitation or Team Management and other operations"
              },
              {
                  "show": true,
                  "access": {
                      "create": true,
                      "delete": true,
                      "update": true
                  },
                  "module": "waivers",
                  "features": [
                      {
                          "name": "waiverFolder",
                          "enabled": true
                      },
                      {
                          "name": "exportWaiver",
                          "enabled": true
                      }
                  ],
                  "description": "Waivers functionalities"
              },
              {
                  "show": true,
                  "access": {
                      "create": false,
                      "delete": true,
                      "update": true
                  },
                  "module": "participant",
                  "features": [
                      {
                          "name": "exportParticipants",
                          "enabled": true
                      }
                  ],
                  "description": "Participant functionalities"
              },
              {
                  "show": true,
                  "access": {
                      "create": true,
                      "delete": true,
                      "update": true
                  },
                  "module": "organization",
                  "features": [
                      {
                          "name": "updateOrganizationAdmin",
                          "enabled": true
                      }
                  ],
                  "description": "Organization Profile"
              },
              {
                  "show": true,
                  "access": {
                      "create": true,
                      "delete": true,
                      "update": true
                  },
                  "module": "profile",
                  "features": [],
                  "description": "User Profile"
              },
              {
                  "show": true,
                  "access": {
                      "create": true,
                      "delete": true,
                      "update": true
                  },
                  "module": "dashboard",
                  "features": [],
                  "description": "Dashboard"
              },
              {
                  "show": true,
                  "access": {
                      "create": false,
                      "delete": false,
                      "update": false
                  },
                  "module": "app",
                  "features": [],
                  "description": "APP access, to be discussed"
              },
              {
                  "show": false,
                  "access": {
                      "create": false,
                      "delete": false,
                      "update": false
                  },
                  "module": "donation",
                  "features": [],
                  "description": "Donation, to be discussed"
              },
              {
                  "show": false,
                  "access": {
                      "create": false,
                      "delete": false,
                      "update": false
                  },
                  "module": "admindDashboard",
                  "features": [],
                  "description": "Administration Dashboard"
              },
              {
                  "show": true,
                  "access": {
                      "create": true,
                      "delete": false,
                      "update": false
                  },
                  "module": "transactions",
                  "features": [],
                  "description": "Transactions"
              },
              {
                  "show": true,
                  "access": {
                      "create": true,
                      "delete": true,
                      "update": true
                  },
                  "module": "waiverTemplates",
                  "features": [],
                  "description": "waiverTemplates"
              }
          ]
      },
      "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InF1YW1lbGV4aXpAZ21haWwuY29tIiwiaWQiOiIxYmFmOGVjZi03OGE4LTQ0ZDItOTI3Mi0zNjkzYjk2OGY4ZTEiLCJwcm92aWRlciI6ImxvY2FsIiwicm9sZSI6eyJsYWJlbCI6Ik9yZ2FuaXphdGlvbiBBZG1pbiIsInZhbHVlIjoiT1JHQU5JWkFUSU9OX0FETUlOIn0sIm9yZ2FuaXphdGlvbklkIjoiZDhlYjRmN2UtZTJlZC00YjhiLTg5ZDUtZGIwMGUzNzI3NjRjIiwiaWF0IjoxNjQyMDc3NzE5LCJleHAiOjE2NzM2MzUzMTl9.b69mN4c5PX56aGIR9jPxwEWtgUC87hOM-QszNZjLePM",
      "refreshToken": "803c19bf-d80d-4db5-9fc9-ddbbf3d1aaaa"
  }

REQUEST PARAMETERS

client_id

The client_id represents the client ID credential located in the setting section of your dashboard. Reference this for more information

client_secret

The client secret represents the client secret credential located in the setting section of your dashboard. Reference this for more information

grant_type

This parameter has a constant value of client_credentials

scope

This parameter has constant scope value of api

RESPONSE PARAMETERS

account

This response object contains all information about the authenticated user

token

The token value MUST be part of the header parameters for all other requests sent to all other endpoints. The token value is assigned to the Authorization parameter of the header.

Example: Authorizaton: Bearer ${token}

refreshToken

This parameter is used to refresh the generated token value.