---
agentTools:
  projectIndex: https://pavlok.readme.io/llms.txt
---

# Authentication

# OpenAPI definition

```json
{
  "openapi": "3.0.2",
  "info": {
    "title": "Pavlok API v5",
    "version": "5.0.0"
  },
  "servers": [
    {
      "url": "https://api.pavlok.com",
      "description": "Prod server"
    }
  ],
  "paths": {
    "/api/v5/user/": {
      "get": {
        "tags": [
          "user"
        ],
        "summary": "Get current user",
        "operationId": "users_get_current_user_api_v5_user__get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserWithVoltsInResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "RWAPIKeyHeader": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "UserSetting": {
        "title": "UserSetting",
        "required": [
          "settingKey",
          "settingValue",
          "settingType"
        ],
        "type": "object",
        "properties": {
          "createdAt": {
            "title": "Createdat",
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "title": "Updatedat",
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "title": "Deletedat",
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "title": "Id",
            "type": "integer",
            "default": 0
          },
          "settingKey": {
            "title": "Settingkey",
            "type": "string"
          },
          "settingValue": {
            "title": "Settingvalue",
            "type": "string"
          },
          "settingType": {
            "$ref": "#/components/schemas/UserSettingsTypes"
          },
          "settingMeta": {
            "title": "Settingmeta",
            "type": "object"
          }
        }
      },
      "UserSettingsTypes": {
        "title": "UserSettingsTypes",
        "enum": [
          "integer",
          "float",
          "string",
          "boolean"
        ],
        "type": "string",
        "description": "An enumeration."
      },
      "UserWithToken": {
        "title": "UserWithToken",
        "required": [
          "email",
          "id",
          "token"
        ],
        "type": "object",
        "properties": {
          "username": {
            "title": "Username",
            "type": "string"
          },
          "email": {
            "title": "Email",
            "type": "string"
          },
          "phone": {
            "title": "Phone",
            "type": "string"
          },
          "countryCode": {
            "title": "Countrycode",
            "type": "string"
          },
          "phoneConfirmed": {
            "title": "Phoneconfirmed",
            "type": "boolean",
            "default": false
          },
          "firstName": {
            "title": "Firstname",
            "type": "string"
          },
          "lastName": {
            "title": "Lastname",
            "type": "string"
          },
          "birthDate": {
            "title": "Birthdate",
            "type": "string",
            "format": "date"
          },
          "weight": {
            "title": "Weight",
            "type": "number"
          },
          "weightMeasurementUnit": {
            "title": "Weightmeasurementunit",
            "type": "string"
          },
          "height": {
            "title": "Height",
            "type": "number"
          },
          "heightMeasurementUnit": {
            "title": "Heightmeasurementunit",
            "type": "string"
          },
          "resetPasswordToken": {
            "title": "Resetpasswordtoken",
            "type": "string"
          },
          "resetPasswordSentAt": {
            "title": "Resetpasswordsentat",
            "type": "string",
            "format": "date-time"
          },
          "profilePictureId": {
            "title": "Profilepictureid",
            "type": "integer"
          },
          "profilePictureUrl": {
            "title": "Profilepictureurl",
            "type": "string"
          },
          "emailConfirmed": {
            "title": "Emailconfirmed",
            "type": "boolean",
            "default": false
          },
          "anonymous": {
            "title": "Anonymous",
            "type": "boolean"
          },
          "role": {
            "title": "Role",
            "type": "string"
          },
          "timezone": {
            "title": "Timezone",
            "type": "string"
          },
          "settings": {
            "title": "Settings",
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/UserSetting"
            }
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "token": {
            "title": "Token",
            "type": "string"
          }
        }
      },
      "UserWithVoltsInResponse": {
        "title": "UserWithVoltsInResponse",
        "required": [
          "user",
          "volts"
        ],
        "type": "object",
        "properties": {
          "user": {
            "$ref": "#/components/schemas/UserWithToken"
          },
          "volts": {
            "title": "Volts",
            "type": "integer"
          }
        }
      }
    },
    "securitySchemes": {
      "RWAPIKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 101,
      "1": 22,
      "2": 222,
      "3": 193,
      "4": 223,
      "5": 202,
      "6": 7,
      "7": 26,
      "8": 169,
      "9": 253,
      "10": 19,
      "11": 43
    }
  }
}
```