Session & Lock
Lock a user account.
POST /v1/auth/admin/lock
Auth: API key (VantagePayAdminClient).
Request body
| Field | Type | Required | Description |
|---|---|---|---|
username | string | Yes | The username of the account to lock (required). |
lockedUntil | string? | No | The UTC date and time until which the account should remain locked. null means locked indefinitely. |
reason | string? | No | The reason for locking the account, stored for audit purposes. |
json
{
"username": "string",
"lockedUntil": "string",
"reason": "string"
}Responses
| Status | Description |
|---|---|
200 | The user was locked successfully. |
400 | The request failed validation, the error object will contain further information. |
401 | The authorization information provided is not valid, authentication is required to access this resource. |
403 | The authorization header does not contain the correct type or you do not have access to this resource. |
422 | The request payload is invalid, the error object will contain further information. |
429 | Too many requests are being sent concurrently or rate limiting has taken effect. |
500 | An unexpected error occurred, the error object will contain further information. |
Response body
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | No | Gets a value indicating whether the operation was successful. |
json
{
"success": true
}Code samples
WARNING
The JavaScript SDK does not cover admin APIs - use the .NET SDK.
csharp
await adminClient.Authentication.LockUserAsync("partner.user", DateTimeOffset.UtcNow.AddHours(1), reason: "Suspicious activity");Unlock a user account.
POST /v1/auth/admin/unlock
Auth: API key (VantagePayAdminClient).
Request body
| Field | Type | Required | Description |
|---|---|---|---|
username | string | Yes | The username of the account to unlock (required). |
json
{
"username": "string"
}Responses
| Status | Description |
|---|---|
200 | The user was unlocked successfully. |
400 | The request failed validation, the error object will contain further information. |
401 | The authorization information provided is not valid, authentication is required to access this resource. |
403 | The authorization header does not contain the correct type or you do not have access to this resource. |
422 | The request payload is invalid, the error object will contain further information. |
429 | Too many requests are being sent concurrently or rate limiting has taken effect. |
500 | An unexpected error occurred, the error object will contain further information. |
Response body
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | No | Gets a value indicating whether the operation was successful. |
json
{
"success": true
}Code samples
WARNING
The JavaScript SDK does not cover admin APIs - use the .NET SDK.
csharp
await adminClient.Authentication.UnlockUserAsync("partner.user");Logout a user account.
POST /v1/auth/admin/logout
Auth: API key (VantagePayAdminClient).
Request body
| Field | Type | Required | Description |
|---|---|---|---|
username | string | Yes | The username of the account to log out (required). |
json
{
"username": "string"
}Responses
| Status | Description |
|---|---|
200 | The user was logged out successfully. |
400 | The request failed validation, the error object will contain further information. |
401 | The authorization information provided is not valid, authentication is required to access this resource. |
403 | The authorization header does not contain the correct type or you do not have access to this resource. |
422 | The request payload is invalid, the error object will contain further information. |
429 | Too many requests are being sent concurrently or rate limiting has taken effect. |
500 | An unexpected error occurred, the error object will contain further information. |
Response body
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | No | Gets a value indicating whether the operation was successful. |
json
{
"success": true
}Code samples
WARNING
The JavaScript SDK does not cover admin APIs - use the .NET SDK.
csharp
await adminClient.Authentication.LogoutUserAsync("partner.user");Administrator reset of a user's password.
POST /v1/auth/admin/password/reset
Sample
json
POST v1/user/password/reset
{
"username": "{{$randomUserName}}",
"password": "{{$randomPassword}}"
}Auth: API key (VantagePayAdminClient).
Request body
| Field | Type | Required | Description |
|---|---|---|---|
username | string | Yes | The username (required). |
password | string | Yes | The password (required). |
isLockedOut | boolean | No | true if the user account is currently locked out. |
reasonForLockout | string? | No | The reason the user account was locked out, if applicable. |
json
{
"username": "string",
"password": "string",
"isLockedOut": true,
"reasonForLockout": "string"
}Responses
| Status | Description |
|---|---|
200 | The request was successful and the password was reset. |
400 | The request failed validation, the error object will contain further information. |
401 | The authorization information provided is not valid, authentication is required to access this resource. |
403 | The authorization header does not contain the correct type or you do not have access to this resource. |
404 | The request was successful but does not return any results. |
422 | The request payload is invalid, the error object will contain further information. |
429 | Too many requests are being sent concurrently or rate limiting has taken effect. |
500 | An unexpected error occurred, the error object will contain further information. |
Response body
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | No | Gets a value indicating whether the operation was successful. |
json
{
"success": true
}Code samples
WARNING
The JavaScript SDK does not cover admin APIs - use the .NET SDK.
csharp
var userReference = await adminClient.Authentication.ResetPasswordAsync("partner.user", "NewStrongPassword123!");