Cloud API Authentication

Cloud API Authentication

Base URL: https://public-api.loadgen.cloud

This article documents authentication and identity-related endpoints (tenant discovery, token issuance, refresh, impersonation, and related flows).

Common headers

  • Authorization: Bearer (when required)
  • Abp.TenantId: (tenant context; see endpoint notes)

Authenticate

Method: POST

Path: /api/TokenAuth/Authenticate

Operation ID: ApiTokenauthAuthenticatePost

Tag: TokenAuth

Authentication: No (public endpoint)

Scope: Tenant (default)

Notes:

  • Most endpoints return an ABP-style response envelope. In practice, the payload is usually available under the result property.
  • This API is multi-tenant. Even when there is no explicit TenantId query parameter, tenant context is typically derived from the JWT token and/or the Abp.TenantId header.

Parameters

None

Request body

Request body schema: AuthenticateModel

Request body fields

| Field | Type | Required | Description | Notes |

|---|---|---:|---|---|

| password | string | Yes | | minLength: 1

maxLength: 32 |

| userNameOrEmailAddress | string | Yes | | minLength: 1

maxLength: 256 |

| captchaResponse | string | No | | |

| rememberClient | boolean | No | | |

| returnUrl | string | No | | |

| singleSignIn | boolean | No | | |

| twoFactorRememberClientToken | string | No | | |

| twoFactorVerificationCode | string | No | | |

Example request body

`json

{

"password": "string",

"userNameOrEmailAddress": "user@example.com",

"twoFactorVerificationCode": "string"

}

`

Response

Response envelope: ABP

  • The actual payload is usually under the result property.
  • Success is indicated by success: true. Errors are provided via error and unAuthorizedRequest.

200 OK response schema: AuthenticateResultModel

Response fields

| Field | Type | Required | Description | Notes |

|---|---|---:|---|---|

| accessToken | string | No | | |

| c | string | No | | |

| encryptedAccessToken | string | No | | |

| expireInSeconds | integer (int32) | No | | format: int32 |

| passwordResetCode | string | No | | |

| refreshToken | string | No | | |

| refreshTokenExpireInSeconds | integer (int32) | No | | format: int32 |

| requiresTwoFactorVerification | boolean | No | | |

| returnUrl | string | No | | |

| shouldResetPassword | boolean | No | | |

| twoFactorAuthProviders | array | No | | |

| twoFactorRememberClientToken | string | No | | |

| userId | integer (int64) | No | | format: int64 |

Example response

`json

{

"result": {

"accessToken": "string",

"encryptedAccessToken": "string",

"expireInSeconds": 0

},

"targetUrl": null,

"success": true,

"error": null,

"unAuthorizedRequest": false,

"\\abp": true

}

`

Curl

`bash

curl -X POST "https://public-api.loadgen.cloud/api/TokenAuth/Authenticate" \\

-H "Abp.TenantId: 12345" \\

-H "Accept: application/json" \\

-H "Content-Type: application/json" \\

--data-raw '{"password":"string","userNameOrEmailAddress":"user@example.com","twoFactorVerificationCode":"string"}'

`

PowerShell

`powershell

$baseUrl = "https://public-api.loadgen.cloud"

$uri = "$baseUrl/api/TokenAuth/Authenticate"

$tenantId = 12345

$headers = @{ "Abp.TenantId" = "$tenantId"; Accept = "application/json" }

$body = @'

{

"password": "string",

"userNameOrEmailAddress": "user@example.com",

"twoFactorVerificationCode": "string"

}

'@

Invoke-RestMethod -Method POST -Uri $uri -Headers $headers -ContentType "application/json" -Body $body

`

DelegatedImpersonatedAuthenticate

Method: POST

Path: /api/TokenAuth/DelegatedImpersonatedAuthenticate

Operation ID: ApiTokenauthDelegatedimpersonatedauthenticatePost

Tag: TokenAuth

Authentication: No (public endpoint)

Scope: Tenant (default)

Notes:

  • Most endpoints return an ABP-style response envelope. In practice, the payload is usually available under the result property.
  • This API is multi-tenant. Even when there is no explicit TenantId query parameter, tenant context is typically derived from the JWT token and/or the Abp.TenantId header.

Parameters

| Name | In | Type | Required | Default | Notes |

|---|---|---|---:|---|---|

| userDelegationId | query | integer (int64) | No | | format: int64 |

| impersonationToken | query | string | No | | |

Request body

None

Response

Response envelope: ABP

  • The actual payload is usually under the result property.
  • Success is indicated by success: true. Errors are provided via error and unAuthorizedRequest.

200 OK response schema: ImpersonatedAuthenticateResultModel

Response fields

| Field | Type | Required | Description | Notes |

|---|---|---:|---|---|

| accessToken | string | No | | |

| encryptedAccessToken | string | No | | |

| expireInSeconds | integer (int32) | No | | format: int32 |

Example response

`json

{

"result": {

"accessToken": "string",

"encryptedAccessToken": "string",

"expireInSeconds": 0

},

"targetUrl": null,

"success": true,

"error": null,

"unAuthorizedRequest": false,

"\\abp": true

}

`

Curl

`bash

curl -X POST "https://public-api.loadgen.cloud/api/TokenAuth/DelegatedImpersonatedAuthenticate?userDelegationId=0&impersonationToken=string" \\

-H "Abp.TenantId: 12345" \\

-H "Accept: application/json" \\

-H "Content-Type: application/json"

`

PowerShell

`powershell

$baseUrl = "https://public-api.loadgen.cloud"

$uri = "$baseUrl/api/TokenAuth/DelegatedImpersonatedAuthenticate?userDelegationId=0&impersonationToken=string"

$tenantId = 12345

$headers = @{ "Abp.TenantId" = "$tenantId"; Accept = "application/json" }

Invoke-RestMethod -Method POST -Uri $uri -Headers $headers

`

ExternalAuthenticate

Method: POST

Path: /api/TokenAuth/ExternalAuthenticate

Operation ID: ApiTokenauthExternalauthenticatePost

Tag: TokenAuth

Authentication: No (public endpoint)

Scope: Tenant (default)

Notes:

  • Most endpoints return an ABP-style response envelope. In practice, the payload is usually available under the result property.
  • This API is multi-tenant. Even when there is no explicit TenantId query parameter, tenant context is typically derived from the JWT token and/or the Abp.TenantId header.

Parameters

None

Request body

Request body schema: ExternalAuthenticateModel

Request body fields

| Field | Type | Required | Description | Notes |

|---|---|---:|---|---|

| authProvider | string | Yes | | minLength: 1

maxLength: 128 |

| providerAccessCode | string | Yes | | minLength: 1 |

| providerKey | string | Yes | | minLength: 1

maxLength: 256 |

| returnUrl | string | No | | |

| singleSignIn | boolean | No | | |

Example request body

`json

{

"authProvider": "string",

"providerAccessCode": "string",

"providerKey": "string"

}

`

Response

Response envelope: ABP

  • The actual payload is usually under the result property.
  • Success is indicated by success: true. Errors are provided via error and unAuthorizedRequest.

200 OK response schema: ExternalAuthenticateResultModel

Response fields

| Field | Type | Required | Description | Notes |

|---|---|---:|---|---|

| accessToken | string | No | | |

| encryptedAccessToken | string | No | | |

| expireInSeconds | integer (int32) | No | | format: int32 |

| refreshToken | string | No | | |

| refreshTokenExpireInSeconds | integer (int32) | No | | format: int32 |

| returnUrl | string | No | | |

| waitingForActivation | boolean | No | | |

Example response

`json

{

"result": {

"accessToken": "string",

"encryptedAccessToken": "string",

"expireInSeconds": 0

},

"targetUrl": null,

"success": true,

"error": null,

"unAuthorizedRequest": false,

"\\abp": true

}

`

Curl

`bash

curl -X POST "https://public-api.loadgen.cloud/api/TokenAuth/ExternalAuthenticate" \\

-H "Abp.TenantId: 12345" \\

-H "Accept: application/json" \\

-H "Content-Type: application/json" \\

--data-raw '{"authProvider":"string","providerAccessCode":"string","providerKey":"string"}'

`

PowerShell

`powershell

$baseUrl = "https://public-api.loadgen.cloud"

$uri = "$baseUrl/api/TokenAuth/ExternalAuthenticate"

$tenantId = 12345

$headers = @{ "Abp.TenantId" = "$tenantId"; Accept = "application/json" }

$body = @'

{

"authProvider": "string",

"providerAccessCode": "string",

"providerKey": "string"

}

'@

Invoke-RestMethod -Method POST -Uri $uri -Headers $headers -ContentType "application/json" -Body $body

`

GetExternalAuthenticationProviders

Method: GET

Path: /api/TokenAuth/GetExternalAuthenticationProviders

Operation ID: ApiTokenauthGetexternalauthenticationprovidersGet

Tag: TokenAuth

Authentication: No (public endpoint)

Scope: Tenant (default)

Notes:

  • Most endpoints return an ABP-style response envelope. In practice, the payload is usually available under the result property.
  • This API is multi-tenant. Even when there is no explicit TenantId query parameter, tenant context is typically derived from the JWT token and/or the Abp.TenantId header.

Parameters

None

Request body

None

Response

Response envelope: ABP

  • The actual payload is usually under the result property.
  • Success is indicated by success: true. Errors are provided via error and unAuthorizedRequest.

200 OK response schema: array

Response fields

None

Example response

`json

{

"result": [

{

"name": "string",

"clientId": "string",

"additionalParams": {

"key": "string"

}

}

],

"targetUrl": null,

"success": true,

"error": null,

"unAuthorizedRequest": false,

"\\abp": true

}

`

Curl

`bash

curl -X GET "https://public-api.loadgen.cloud/api/TokenAuth/GetExternalAuthenticationProviders" \\

-H "Abp.TenantId: 12345" \\

-H "Accept: application/json"

`

PowerShell

`powershell

$baseUrl = "https://public-api.loadgen.cloud"

$uri = "$baseUrl/api/TokenAuth/GetExternalAuthenticationProviders"

$tenantId = 12345

$headers = @{ "Abp.TenantId" = "$tenantId"; Accept = "application/json" }

Invoke-RestMethod -Method GET -Uri $uri -Headers $headers

`

ImpersonatedAuthenticate

Method: POST

Path: /api/TokenAuth/ImpersonatedAuthenticate

Operation ID: ApiTokenauthImpersonatedauthenticatePost

Tag: TokenAuth

Authentication: No (public endpoint)

Scope: Tenant (default)

Notes:

  • Most endpoints return an ABP-style response envelope. In practice, the payload is usually available under the result property.
  • This API is multi-tenant. Even when there is no explicit TenantId query parameter, tenant context is typically derived from the JWT token and/or the Abp.TenantId header.

Parameters

| Name | In | Type | Required | Default | Notes |

|---|---|---|---:|---|---|

| impersonationToken | query | string | No | | |

Request body

None

Response

Response envelope: ABP

  • The actual payload is usually under the result property.
  • Success is indicated by success: true. Errors are provided via error and unAuthorizedRequest.

200 OK response schema: ImpersonatedAuthenticateResultModel

Response fields

| Field | Type | Required | Description | Notes |

|---|---|---:|---|---|

| accessToken | string | No | | |

| encryptedAccessToken | string | No | | |

| expireInSeconds | integer (int32) | No | | format: int32 |

Example response

`json

{

"result": {

"accessToken": "string",

"encryptedAccessToken": "string",

"expireInSeconds": 0

},

"targetUrl": null,

"success": true,

"error": null,

"unAuthorizedRequest": false,

"\\abp": true

}

`

Curl

`bash

curl -X POST "https://public-api.loadgen.cloud/api/TokenAuth/ImpersonatedAuthenticate?impersonationToken=string" \\

-H "Abp.TenantId: 12345" \\

-H "Accept: application/json" \\

-H "Content-Type: application/json"

`

PowerShell

`powershell

$baseUrl = "https://public-api.loadgen.cloud"

$uri = "$baseUrl/api/TokenAuth/ImpersonatedAuthenticate?impersonationToken=string"

$tenantId = 12345

$headers = @{ "Abp.TenantId" = "$tenantId"; Accept = "application/json" }

Invoke-RestMethod -Method POST -Uri $uri -Headers $headers

`

LinkedAccountAuthenticate

Method: POST

Path: /api/TokenAuth/LinkedAccountAuthenticate

Operation ID: ApiTokenauthLinkedaccountauthenticatePost

Tag: TokenAuth

Authentication: No (public endpoint)

Scope: Tenant (default)

Notes:

  • Most endpoints return an ABP-style response envelope. In practice, the payload is usually available under the result property.
  • This API is multi-tenant. Even when there is no explicit TenantId query parameter, tenant context is typically derived from the JWT token and/or the Abp.TenantId header.

Parameters

| Name | In | Type | Required | Default | Notes |

|---|---|---|---:|---|---|

| switchAccountToken | query | string | No | | |

Request body

None

Response

Response envelope: ABP

  • The actual payload is usually under the result property.
  • Success is indicated by success: true. Errors are provided via error and unAuthorizedRequest.

200 OK response schema: SwitchedAccountAuthenticateResultModel

Response fields

| Field | Type | Required | Description | Notes |

|---|---|---:|---|---|

| accessToken | string | No | | |

| encryptedAccessToken | string | No | | |

| expireInSeconds | integer (int32) | No | | format: int32 |

Example response

`json

{

"result": {

"accessToken": "string",

"encryptedAccessToken": "string",

"expireInSeconds": 0

},

"targetUrl": null,

"success": true,

"error": null,

"unAuthorizedRequest": false,

"\\abp": true

}

`

Curl

`bash

curl -X POST "https://public-api.loadgen.cloud/api/TokenAuth/LinkedAccountAuthenticate?switchAccountToken=string" \\

-H "Abp.TenantId: 12345" \\

-H "Accept: application/json" \\

-H "Content-Type: application/json"

`

PowerShell

`powershell

$baseUrl = "https://public-api.loadgen.cloud"

$uri = "$baseUrl/api/TokenAuth/LinkedAccountAuthenticate?switchAccountToken=string"

$tenantId = 12345

$headers = @{ "Abp.TenantId" = "$tenantId"; Accept = "application/json" }

Invoke-RestMethod -Method POST -Uri $uri -Headers $headers

`

LogOut

Method: GET

Path: /api/TokenAuth/LogOut

Operation ID: ApiTokenauthLogoutGet

Tag: TokenAuth

Authentication: Yes (Bearer token)

Scope: Tenant (default)

Notes:

  • Most endpoints return an ABP-style response envelope. In practice, the payload is usually available under the result property.
  • This API is multi-tenant. Even when there is no explicit TenantId query parameter, tenant context is typically derived from the JWT token and/or the Abp.TenantId header.

Parameters

None

Request body

None

Response

None

Curl

`bash

curl -X GET "https://public-api.loadgen.cloud/api/TokenAuth/LogOut" \\

-H "Authorization: Bearer " \\

-H "Abp.TenantId: 12345" \\

-H "Accept: application/json"

`

PowerShell

`powershell

$baseUrl = "https://public-api.loadgen.cloud"

$uri = "$baseUrl/api/TokenAuth/LogOut"

$tenantId = 12345

$accessToken = ""

$headers = @{ Authorization = "Bearer $accessToken"; "Abp.TenantId" = "$tenantId"; Accept = "application/json" }

Invoke-RestMethod -Method GET -Uri $uri -Headers $headers

`

RefreshToken

Method: POST

Path: /api/TokenAuth/RefreshToken

Operation ID: ApiTokenauthRefreshtokenPost

Tag: TokenAuth

Authentication: No (public endpoint)

Scope: Tenant (default)

Notes:

  • Most endpoints return an ABP-style response envelope. In practice, the payload is usually available under the result property.
  • This API is multi-tenant. Even when there is no explicit TenantId query parameter, tenant context is typically derived from the JWT token and/or the Abp.TenantId header.

Parameters

| Name | In | Type | Required | Default | Notes |

|---|---|---|---:|---|---|

| refreshToken | query | string | No | | |

Request body

None

Response

Response envelope: ABP

  • The actual payload is usually under the result property.
  • Success is indicated by success: true. Errors are provided via error and unAuthorizedRequest.

200 OK response schema: RefreshTokenResult

Response fields

| Field | Type | Required | Description | Notes |

|---|---|---:|---|---|

| accessToken | string | No | | |

| encryptedAccessToken | string | No | | |

| expireInSeconds | integer (int32) | No | | format: int32 |

Example response

`json

{

"result": {

"accessToken": "string",

"encryptedAccessToken": "string",

"expireInSeconds": 0

},

"targetUrl": null,

"success": true,

"error": null,

"unAuthorizedRequest": false,

"\\abp": true

}

`

Curl

`bash

curl -X POST "https://public-api.loadgen.cloud/api/TokenAuth/RefreshToken?refreshToken=string" \\

-H "Abp.TenantId: 12345" \\

-H "Accept: application/json" \\

-H "Content-Type: application/json"

`

PowerShell

`powershell

$baseUrl = "https://public-api.loadgen.cloud"

$uri = "$baseUrl/api/TokenAuth/RefreshToken?refreshToken=string"

$tenantId = 12345

$headers = @{ "Abp.TenantId" = "$tenantId"; Accept = "application/json" }

Invoke-RestMethod -Method POST -Uri $uri -Headers $headers

`

SendTwoFactorAuthCode

Method: POST

Path: /api/TokenAuth/SendTwoFactorAuthCode

Operation ID: ApiTokenauthSendtwofactorauthcodePost

Tag: TokenAuth

Authentication: No (public endpoint)

Scope: Tenant (default)

Notes:

  • Most endpoints return an ABP-style response envelope. In practice, the payload is usually available under the result property.
  • This API is multi-tenant. Even when there is no explicit TenantId query parameter, tenant context is typically derived from the JWT token and/or the Abp.TenantId header.

Parameters

None

Request body

Request body schema: SendTwoFactorAuthCodeModel

Request body fields

| Field | Type | Required | Description | Notes |

|---|---|---:|---|---|

| provider | string | Yes | | minLength: 1 |

| userId | integer (int64) | No | | format: int64

min: 1 |

Example request body

`json

{

"provider": "string",

"userId": 1

}

`

Response

None

Curl

`bash

curl -X POST "https://public-api.loadgen.cloud/api/TokenAuth/SendTwoFactorAuthCode" \\

-H "Abp.TenantId: 12345" \\

-H "Accept: application/json" \\

-H "Content-Type: application/json" \\

--data-raw '{"provider":"string","userId":1}'

`

PowerShell

`powershell

$baseUrl = "https://public-api.loadgen.cloud"

$uri = "$baseUrl/api/TokenAuth/SendTwoFactorAuthCode"

$tenantId = 12345

$headers = @{ "Abp.TenantId" = "$tenantId"; Accept = "application/json" }

$body = @'

{

"provider": "string",

"userId": 1

}

'@

Invoke-RestMethod -Method POST -Uri $uri -Headers $headers -ContentType "application/json" -Body $body

`

TestNotification

Method: GET

Path: /api/TokenAuth/TestNotification

Operation ID: ApiTokenauthTestnotificationGet

Tag: TokenAuth

Authentication: Yes (Bearer token)

Scope: Tenant (default)

Notes:

  • Most endpoints return an ABP-style response envelope. In practice, the payload is usually available under the result property.
  • This API is multi-tenant. Even when there is no explicit TenantId query parameter, tenant context is typically derived from the JWT token and/or the Abp.TenantId header.

Parameters

| Name | In | Type | Required | Default | Notes |

|---|---|---|---:|---|---|

| message | query | string | No | `` | |

| severity | query | string | No | info | |

Request body

None

Response

None

Curl

`bash

curl -X GET "https://public-api.loadgen.cloud/api/TokenAuth/TestNotification?message=string&severity=string" \\

-H "Authorization: Bearer " \\

-H "Abp.TenantId: 12345" \\

-H "Accept: application/json"

`

PowerShell

`powershell

$baseUrl = "https://public-api.loadgen.cloud"

$uri = "$baseUrl/api/TokenAuth/TestNotification?message=string&severity=string"

$tenantId = 12345

$accessToken = ""

$headers = @{ Authorization = "Bearer $accessToken"; "Abp.TenantId" = "$tenantId"; Accept = "application/json" }

Invoke-RestMethod -Method GET -Uri $uri -Headers $headers

`

GetAccessToken

Method: POST

Path: /api/Twitter/GetAccessToken

Operation ID: ApiTwitterGetaccesstokenPost

Tag: Twitter

Authentication: No (public endpoint)

Scope: Tenant (default)

Notes:

  • Most endpoints return an ABP-style response envelope. In practice, the payload is usually available under the result property.
  • This API is multi-tenant. Even when there is no explicit TenantId query parameter, tenant context is typically derived from the JWT token and/or the Abp.TenantId header.

Parameters

| Name | In | Type | Required | Default | Notes |

|---|---|---|---:|---|---|

| token | query | string | No | | |

| verifier | query | string | No | | |

Request body

None

Response

Response envelope: ABP

  • The actual payload is usually under the result property.
  • Success is indicated by success: true. Errors are provided via error and unAuthorizedRequest.

200 OK response schema: TwitterGetAccessTokenResponse

Response fields

| Field | Type | Required | Description | Notes |

|---|---|---:|---|---|

| accessToken | string | No | | |

| accessTokenSecret | string | No | | |

| userId | string | No | | |

| userName | string | No | | |

Example response

`json

{

"result": {

"accessToken": "string",

"accessTokenSecret": "string",

"userId": "string"

},

"targetUrl": null,

"success": true,

"error": null,

"unAuthorizedRequest": false,

"\\abp": true

}

`

Curl

`bash

curl -X POST "https://public-api.loadgen.cloud/api/Twitter/GetAccessToken?token=string&verifier=string" \\

-H "Abp.TenantId: 12345" \\

-H "Accept: application/json" \\

-H "Content-Type: application/json"

`

PowerShell

`powershell

$baseUrl = "https://public-api.loadgen.cloud"

$uri = "$baseUrl/api/Twitter/GetAccessToken?token=string&verifier=string"

$tenantId = 12345

$headers = @{ "Abp.TenantId" = "$tenantId"; Accept = "application/json" }

Invoke-RestMethod -Method POST -Uri $uri -Headers $headers

`

GetRequestToken

Method: POST

Path: /api/Twitter/GetRequestToken

Operation ID: ApiTwitterGetrequesttokenPost

Tag: Twitter

Authentication: No (public endpoint)

Scope: Tenant (default)

Notes:

  • Most endpoints return an ABP-style response envelope. In practice, the payload is usually available under the result property.
  • This API is multi-tenant. Even when there is no explicit TenantId query parameter, tenant context is typically derived from the JWT token and/or the Abp.TenantId header.

Parameters

None

Request body

None

Response

Response envelope: ABP

  • The actual payload is usually under the result property.
  • Success is indicated by success: true. Errors are provided via error and unAuthorizedRequest.

200 OK response schema: TwitterGetRequestTokenResponse

Response fields

| Field | Type | Required | Description | Notes |

|---|---|---:|---|---|

| confirmed | boolean | No | | |

| redirectUrl | string | No | | |

| secret | string | No | | |

| token | string | No | | |

Example response

`json

{

"result": {

"token": "string",

"secret": "string",

"confirmed": false

},

"targetUrl": null,

"success": true,

"error": null,

"unAuthorizedRequest": false,

"\\abp": true

}

`

Curl

`bash

curl -X POST "https://public-api.loadgen.cloud/api/Twitter/GetRequestToken" \\

-H "Abp.TenantId: 12345" \\

-H "Accept: application/json" \\

-H "Content-Type: application/json"

`

PowerShell

`powershell

$baseUrl = "https://public-api.loadgen.cloud"

$uri = "$baseUrl/api/Twitter/GetRequestToken"

$tenantId = 12345

$headers = @{ "Abp.TenantId" = "$tenantId"; Accept = "application/json" }

Invoke-RestMethod -Method POST -Uri $uri -Headers $headers

`

Was this article helpful?
0 out of 0 found this helpful