Get Access Token & SID

Overview

Login is the first step to authenticate your an authentication process that a user has to go through at the initial stage. A user can access the platform only after successfully passing through this process.

To perform a login request, a user must have the following information:

Required header info:

  • clientId
  • clientCode
  • signature

Required body info:

  • userName
  • password

The request is posted to the login URL https://servicesuat.onesingleview.com/v1/api/osvPlatform/login in the specified format with all the required details. The system then processes the information to authenticate and a response is generated based on the validity of the details.

Requesting Access Token & SID

curl --location --request POST 'https://sandbox.onesingleview.com/v1/api/osvPlatform/login' \
--header 'clientId: Enter_Client_ID' \
--header 'clientCode: Enter_Client_Code' \
--header 'signature: Enter_Signature' \
--header 'Content-Type: application/json' \
--data-raw '{
    "osvPlatformLoginRQ" :{
       "userName":"Enter_user_name",
       "password":"Enter_password"
    }
}'

Description:

JSON TagDescriptionData type
clientId
Mandatory
Unique authentication value provided to the registered users as Client IDString
clientCode
Mandatory
Unique authentication value provided to the registered users as Client CodeString
signature
Mandatory
SHA-256 encrypted string generated by processing unique authentication value Signature KeyString
osvPlatformLoginRQ
Mandatory
Login request object tagObject
userName
Mandatory
Username for the user accountString
password
Mandatory
Password for the user accountString

Sample responses

Valid response

✔️ Response occurs if the request is valid and is successfully authenticated and processed

{
    "osvPlatformLoginRS": {
        "statusCode": "200",
        "status": "SUCCESS",
        "message": "Welcome Message",
        "accessToken": "Access_Token",
        "sid": "Session_ID"
    }
}

Description:

JSON TagDescriptionData type
osvPlatformLoginRSLogin Response TagObject
statusCodeStatus Code of the responseString
statusStatus Details of the responseString
messageResponse MessageString
accessTokenAccess TokenString
sidSession IDString

Invalid response

❌ Response occurs if an invalid request format or details or invalid authentication exists

{
        status: "FAILURE",
        errorCode: "Error_Code",
        message: "Invalid_Message"
      }

Description:

JSON TagDescriptionData type
statusStatus of the responseString
errorCodeError CodeString
messageResponse MessageString

Technical error response

⚠️ Response occurs if a technical error is encountered during the processing of the request

{
        status: "TECHERROR",
        errorCode: "Error_Code",
        message: "Error_Message"
      }

Description:

JSON TagDescriptionData type
statusStatus of the responseString
errorCodeError CodeString
messageResponse MessageString