HumHub - Auth API (1.0.0)

Download OpenAPI specification:Download

E-mail: info@humhub.com License: AGPLv2

Welcome to the HumHub auth module API reference.

Authentication

Login in the application

Request Body schema: application/json

Credentials for login in app

username
required
string

Your username or email address

password
required
string

Responses

Request samples

Content type
application/json
{
  • "username": "username@example.com",
  • "password": "password"
}

Response samples

Content type
{
  • "code": 200,
  • "message": "string",
  • "auth_token": "eyJ0eXAiOiJKV1QiLC .... tE_7_rLSX3vA",
  • "expired_at": "string"
}

User

Get current user

Responses

Response samples

Content type
application/json
{
  • "id": 14,
  • "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
  • "display_name": "John Doe",
  • "account": {
    },
  • "profile": {
    }
}

Impersonate user

Request Body schema: application/json

id of user to Impersonate

userId
required
integer

id of user to Impersonate

Responses

Request samples

Content type
application/json
{
  • "userId": 1
}

Response samples

Content type
application/json
{
  • "token": "impersonate-YvyEVcbzCvg0wLjb9yXylj1bkbotlCwkKjNKTZD9xeMO86o1G-V9p-wklm5pUdXhdkSGj5dk-l",
  • "expires": 1681671865
}