openId openIdConnect | Resource | Description |
|---|---|
| Number Verification | API operation to verify a phone number received as input. It can be received either in plain text or hashed format. |
| LocationVerification | Verify the location of a device |
openId openIdConnect | Resource | Description |
|---|---|
| Number Verification | API operation to verify a phone number received as input. It can be received either in plain text or hashed format. |
| LocationVerification | Verify the location of a device |
Verifies if the specified phone number (either in plain text or hashed format) matches the one that the user is currently using. Only one of the plain or hashed formats must be provided.
device phone number associated to the access tokenPATH PARAMETERS
{
"referenceMsisdn": "+34611223344",
"evidence": {
"type": "PLAIN",
"value": "+34611223344"
}
} {
"referenceMsisdn": "+34611223344",
"evidence": {
"type": "HASHED_SHA256",
"value": "32f67ab4e4312618b09cd23ed8ce41b13e095fe52b73b2e8da8ef49830e50dba"
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
referenceMsisdn
*
| string | The MSISDN assigned by the network and extracted from the authentication token. A public identifier addressing a telephone subscription. In mobile networks it corresponds to the MSISDN (Mobile Station International Subscriber Directory Number). In order to be globally unique it has to be formatted in international format, according to E.164 standard, prefixed with '+'. | pattern: ^\+[1-9][0-9]{4,14}$ | ||||||||||||||||
evidence
*
| object | ||||||||||||||||||
| |||||||||||||||||||
OK OK
{
"devicePhoneNumberVerified": true
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
devicePhoneNumberVerified
*
| boolean | Number verification. True, if it matches |
Bad Request Problem with the client request
{
"code": "string",
"title": "string",
"ref": "string",
"details": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
code
*
| string | code of the error | ||
title
*
| string | title of the error | ||
ref
*
| string | ref of the error | ||
details
*
| string | details of the error |
Unauthorized Unauthorized
{
"code": "string",
"title": "string",
"ref": "string",
"details": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
code
*
| string | code of the error | ||
title
*
| string | title of the error | ||
ref
*
| string | ref of the error | ||
details
*
| string | details of the error |
Forbidden Client does not have sufficient permission. In addition to regular scenario of `PERMISSION_DENIED`, other scenarios may exist: - Client authentication was not via mobile network. In order to check the authentication method, AMR parameter value in the 3-legged user's access token can be used and make sure that the authentication was not either by SMS+OTP nor username/password (`{"code": "NUMBER_VERIFICATION.USER_NOT_AUTHENTICATED_BY_MOBILE_NETWORK","message": "Client must authenticate via the mobile network to use this service"}`)
{
"code": "string",
"title": "string",
"ref": "string",
"details": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
code
*
| string | code of the error | ||
title
*
| string | title of the error | ||
ref
*
| string | ref of the error | ||
details
*
| string | details of the error |
Internal Server Error Server error
{
"code": "string",
"title": "string",
"ref": "string",
"details": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
code
*
| string | code of the error | ||
title
*
| string | title of the error | ||
ref
*
| string | ref of the error | ||
details
*
| string | details of the error |
Service Unavailable Service unavailable. Typically the server is down.
{
"code": "string",
"title": "string",
"ref": "string",
"details": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
code
*
| string | code of the error | ||
title
*
| string | title of the error | ||
ref
*
| string | ref of the error | ||
details
*
| string | details of the error |
Gateway Timeout Request time exceeded. If it happens repeatedly, consider reducing the request complexity
{
"code": "string",
"title": "string",
"ref": "string",
"details": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
code
*
| string | code of the error | ||
title
*
| string | title of the error | ||
ref
*
| string | ref of the error | ||
details
*
| string | details of the error |
x-correlatorstringCorrelation id for the different services
curl -X POST 'https://opengateway.masstack.com/v2/orgs/masmovil/number-verification/verify' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"referenceMsisdn": "+34611223344",
"evidence": {
"type": "PLAIN",
"value": "+34611223344"
}
}' Verify whether the location of a device is within a requested area.
PATH PARAMETERS
{
"phoneNumber": "+34600000000",
"area": {
"areaType": "CIRCLE",
"center": {
"latitude": 40.416775,
"longitude": -3.70379
},
"radius": 500
},
"maxAge": 120
} {
"phoneNumber": "+34600000000",
"area": {
"areaType": "CIRCLE",
"center": {
"latitude": 40.416775,
"longitude": -3.70379
},
"radius": 500
}
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
phoneNumber
*
| string | A public identifier addressing a telephone subscription. In mobile networks it corresponds to the MSISDN, formatted in international format (E.164), prefixed with '+'. | pattern: ^\+[1-9][0-9]{4,14}$ | |||||||||||||||||||||||||||||||||||||||||||||||||||
device | object | End-user device able to connect to a mobile network. It must not be provided when using a three-legged access token, as the subject is uniquely identified from the token. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
area
*
| object | Circular area where a device may be physically located. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
maxAge | integer | The maximum age (in seconds) for the location known by the implementation, which is accepted for the verification. Absence of maxAge means "any age" and maxAge=0 means a fresh calculation. | min: 0 | |||||||||||||||||||||||||||||||||||||||||||||||||||
OK Location verification result
{
"lastLocationTime": "2023-09-07T10:40:52Z",
"verificationResult": "TRUE",
"matchRate": 0
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
lastLocationTime | string (date-time) | Timestamp of the last location information. It must follow RFC 3339 and must have time zone. | ||
verificationResult
*
| string
()
TRUEFALSEUNKNOWNPARTIAL | Result of a verification request: - TRUE: the network locates the device within the requested area, - FALSE: the requested area does not match the area where the network locates the device, - UNKNOWN: the network cannot locate the device, - PARTIAL: the requested area partially matches the area where the network locates the device. A matchRate is included in the response. | ||
matchRate | integer | Estimation of the match rate between the requested area and the area where the network locates the device, in percent. Included only if verificationResult is PARTIAL. | min: 1 , max: 99 |
Bad Request Bad Request
{
"code": "string",
"title": "string",
"ref": "string",
"details": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
code
*
| string | code of the error | ||
title
*
| string | title of the error | ||
ref
*
| string | ref of the error | ||
details
*
| string | details of the error |
Unauthorized Unauthorized
{
"code": "string",
"title": "string",
"ref": "string",
"details": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
code
*
| string | code of the error | ||
title
*
| string | title of the error | ||
ref
*
| string | ref of the error | ||
details
*
| string | details of the error |
Forbidden Forbidden
{
"code": "string",
"title": "string",
"ref": "string",
"details": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
code
*
| string | code of the error | ||
title
*
| string | title of the error | ||
ref
*
| string | ref of the error | ||
details
*
| string | details of the error |
Not Found Not found
{
"code": "string",
"title": "string",
"ref": "string",
"details": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
code
*
| string | code of the error | ||
title
*
| string | title of the error | ||
ref
*
| string | ref of the error | ||
details
*
| string | details of the error |
Unprocessable Entity Unprocessable Content
{
"code": "string",
"title": "string",
"ref": "string",
"details": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
code
*
| string | code of the error | ||
title
*
| string | title of the error | ||
ref
*
| string | ref of the error | ||
details
*
| string | details of the error |
curl -X POST 'https://opengateway.masstack.com/v2/orgs/masmovil/location-verification/verify' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"phoneNumber": "+34600000000",
"area": {
"areaType": "CIRCLE",
"center": {
"latitude": 40.416775,
"longitude": -3.70379
},
"radius": 500
},
"maxAge": 120
}'