Whilst not recommended for use in developing an N-Genius Online integration, it is possible for some users to request an access token by using their portal log-in credentials to verify themselves with the identity service.
User credentials
It is important that user credentials are not used in production systems, or any persistent integration to N-Genius Online. Not only will this represent a significant security risk, user credentials will expire after a given number of days, hence will eventually become invalid.
Therefore, the following overview is intended for use only as a debugging or temporary measure.
Please refer to the Request an access token section for our recommended and secure method for retrieving an access token, using an API key.
Request an access token using portal login credentials
HTTP Request Method: POST
Resource (URI): https://identity.sandbox.ngeniuspayments.com/auth/realms/ni/protocol/openidconnect/token
Headers:
Header | Key |
---|---|
Content-Type | application/vnd.ni-identity.v1+json |
Accept | application/vnd.ni-identity.v1+json |
Body / Form Data:
Key | Value |
---|---|
username | [your_username] |
password | [your_password] |
clientid | Network International_PORTAL_ID |
grant_type | password |
Example request (body):
{
"username": "[your_username]",
"password": "[your_password]",
"clientid": "<<tenantName>>_PORTAL_ID",
"grant_type": "password"
}
Example response (body):
{
"access_token": "eyJhbGciOiJSUzI1N…0eDloZnVRI",
"expires_in": 300,
"refresh_expires_in": 1800,
"refresh_token": "eyJhbGciOi…eDloZnVRIn0",
"token_type": "bearer",
"not-before-policy": 0,
"session_state": "1f2e7d6e-e1f6-41f8-b763-37be5ef747d2",
"scope": ""
}