The sequenceId used in the RealNumber® DNO Live Download API identifies when a message was sent over the interface and is used to track and maintain the order of messages. The format is:
<date>:<millisecond timestamp>:<nanoseconds>
The date portion corresponds to the date when the message was sent over the API. The millisecond portion contains the milliseconds since Unix epoch timestamp of when the message was sent. The nanosecond portion can be considered random and is only used to guarantee order and uniqueness between two similar messages that are potentially created at the same millisecond timestamp. This would be an unusual occurrence but could happen when processing messages from a file for example.
In order to use the RealNumber® DNO Live Download API functions, you first need to obtain a token. The API to obtain the token is: https://api-realnumber-ha.somos.com/live/api/oauth/token
It should be a POST request with a JSON format body:
{
"clientId": "client_id_obtained_from_somos", "clientSecret": “client_secret_obtained_from_somos"
}
Successful login returns:
{
"access_token": "eyJhb...",
"scope": "read:livelocal read:livetollfree", "expires_in": 8600,
"token_type": "Bearer"
}
You will want to use ‘Authorization: Bearer access_token’ in the download request. Here is an example using CURL showing the login request.
curl -i --request POST https://api-realnumber-ha.somos.com/live/api/oauth/token -H 'Content-Type: application/json' -H 'Accept: application/json' --data '{"clientId":"your_client_id", "clientSecret":"your_client_secret"}'
Use the returned access_token in the Authorization header field with Bearer in front of it in subsequent API requests. The token will need to be refreshed on a regular basis before it expires. The default expiration time is 8600 seconds.
Example
Request token:
curl -i --request POST https://api-realnumber-ha.somos.com/live/api/oauth/token -H 'Content-Type: application/json' -H 'Accept: application/json' --data '{"clientId":"<client_id>", "clientSecret":"<client_secret>"}'
Returned token:
{"access_token":"<returned token>","token_type":"Bearer","expires_in":8600,"scope":"read:livelocal read:livelocaltext read:livetollfree read:livetollfreetext"}
Request for data:
curl --location 'https://api-realnumber-ha.somos.com/live/api/download/2025-04-14:0:0' \
--header 'Authorization: Bearer <returned token>’
Returned data:
{
"value": "8445551212",
"dno": true,
"dnoType": 0,
"sequenceId": "2025-04-14:1744589452831:282526791696",
"lastUpdate": 1744589448387,
"valueType": "tollfree"
}, …
For more information, please view RealNumber Live DNO.