Skip to main content

Security Endpoints

info

Endpoints used to grant access to the system

GetToken

Login to the system using a username and password. You will receive back a JWT Bearer token that you will need to make secure api requests.

Url: `api/Security/GetToken

Body:

{
username : <use username, mobile number to email>,
password : <your_password>
}

Response:

{
id: <a unique Id>,
userName": <a unique username>,
name": <a display name for the user>,
role": <agent/user>",
token": <use this token for furture calls>,
expires": <the time the token expires>,
language": <the default language of the user>
}

Register

Register a new user on the system

Url: `/api/Security/Register

Body:

{
userName: <the username to be used for this user>,
emailOrMobile: <the users email or mobile number>,
mobile: <a unique mobile number>,
otp: <one time pin>,
password: <access password>,
countryCode: (optional) <ISO Alpha-2 Country code>,
currencyCode: (optional) <Currency code>
}

Response:

{
id: <a unique Id>,
userName": <a unique username>,
name": <a display name for the user>,
role": <agent/user>",
isSubAgent": <is a sub agent>,
token": <use this token for furture calls>,
expires": <the time the token expires>,
language": <the default language of the user>
}
info
  • To automatically create a wallet, pass the countryCode and currencyCode. If the country supports that currency a wallet will automatically be created.

GetCaptcha

Return a captcha image displaying a code

Url: `/api/Security/GetCaptcha?value={value}

Response:

{
id: <a unique Id>,
description: <a base64 jpeg image>
}
info
  • The capture image is used when sending OPT code

SendNewOtp

Sends a one time pin to a user email or mobile

Url: `/api/Security/SendNewOtp?value={value}

info
  • value is the users email or mobile number