Auth

Operations related to the authentication

Login

post
/auth/login

Login by organization user

Authorizations
Body
usernamestringRequired

The username

Example: [email protected]
passwordstringRequired

The password

Example: 123456
Responses
200

OK

application/json
post
/auth/login
POST /api/auth/login HTTP/1.1
Host: abp-api.akinon.net
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 47

{
  "username": "[email protected]",
  "password": 123456
}
{
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9",
  "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"
}

Register

post
/auth/register/{token}

Register by organization user

Authorizations
Path parameters
tokenstringRequired

The invitation token

Body
usernamestringRequired

The username

Example: [email protected]
passwordstringRequired

The password

Example: 123456
firstNamestringRequired

The first name

Example: John
lastNamestringRequired

The last name

Example: Doe
tokenstringRequired

The recaptcha token

Example: 0a6ccf4046b552a92c6b026b414fe28f
Responses
201

Created

application/json
post
/auth/register/{token}
POST /api/auth/register/{token} HTTP/1.1
Host: abp-api.akinon.net
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 126

{
  "username": "[email protected]",
  "password": 123456,
  "firstName": "John",
  "lastName": "Doe",
  "token": "0a6ccf4046b552a92c6b026b414fe28f"
}
{
  "_id": "63ea10b94a472e003305232b",
  "username": "[email protected]",
  "language": "en",
  "region": "us",
  "firstName": "John",
  "lastName": "Doe",
  "status": 1,
  "attributes": {
    "iamUserId": "1234567890"
  },
  "avatarUrl": "text",
  "settings": {
    "mailOnBuildCompleted": true,
    "mailOnCodePushCompleted": true
  },
  "lastLoginAt": "2020-07-23T12:00:00.000Z",
  "createdAt": "2020-07-23T12:00:00.000Z",
  "updatedAt": "2020-07-23T12:00:00.000Z"
}

Change password

post
/auth/change-password

Change password by organization user

Authorizations
Body
passwordstringRequired

The password

Example: 123456
tokenstringRequired

The token

Example: 0a6ccf4046b552a92c6b026b414fe28f
Responses
200

OK

application/json
post
/auth/change-password
POST /api/auth/change-password HTTP/1.1
Host: abp-api.akinon.net
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 62

{
  "password": 123456,
  "token": "0a6ccf4046b552a92c6b026b414fe28f"
}
{
  "_id": "63ea10b94a472e003305232b",
  "username": "[email protected]",
  "language": "en",
  "region": "us",
  "firstName": "John",
  "lastName": "Doe",
  "status": 1,
  "attributes": {
    "iamUserId": "1234567890"
  },
  "avatarUrl": "text",
  "settings": {
    "mailOnBuildCompleted": true,
    "mailOnCodePushCompleted": true
  },
  "lastLoginAt": "2020-07-23T12:00:00.000Z",
  "createdAt": "2020-07-23T12:00:00.000Z",
  "updatedAt": "2020-07-23T12:00:00.000Z"
}

Generate reset token

post
/auth/generate-reset-token

Generate reset token by organization user

Authorizations
Body
usernamestringRequired

The username

Example: [email protected]
Responses
201

Created

No content

post
/auth/generate-reset-token
POST /api/auth/generate-reset-token HTTP/1.1
Host: abp-api.akinon.net
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 29

{
  "username": "[email protected]"
}

No content

Refresh token

post
/auth/refresh-token

Refresh token by organization user

Authorizations
Body
refreshTokenstringRequired

The refresh token

Example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9
Responses
201

Created

application/json
post
/auth/refresh-token
POST /api/auth/refresh-token HTTP/1.1
Host: abp-api.akinon.net
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 55

{
  "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"
}
{
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9",
  "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"
}

Last updated

Was this helpful?