Appearance
Get Phone Number Verification.
Endpoint for getting details of a specific Phone Number Verification request by unique id.
Endpoints
Environment | URL |
---|---|
Sandbox | https://api-test.streamline.laboremus.ug/phone-verify/api/Verification/{id}?v=1.0 |
Production | https://api.streamline.laboremus.ug/phoneid/api/Verification/{id} |
Request
Request Type : GET
Authorization
There are two ways to be authorized when making this request.
js
const token = 'eyJhbGciOiJIUzI1NiIsInR5.eyJzd...ssw5c'
axios.get(API_ENDPOINT,
headers: {
Authorization: `Bearer ${token}`
}
)
const token = 'eyJhbGciOiJIUzI1NiIsInR5.eyJzd...ssw5c'
axios.get(API_ENDPOINT,
headers: {
Authorization: `Bearer ${token}`
}
)
js
import axios from 'axios'
import oauth from 'axios-oauth-client'
const getClientCredentials = oauth.clientCredentials(
axios.create(),
'https://oauth.com/2.0/token',
'CLIENT_ID',
'CLIENT_SECRET'
)
const auth = await getClientCredentials('OPTIONAL_SCOPES')
// => { "access_token": "...", "expires_in": 900, ... }
axios.get(API_ENDPOINT,
headers: {
Authorization: `Bearer ${auth.access_token}`
}
)
import axios from 'axios'
import oauth from 'axios-oauth-client'
const getClientCredentials = oauth.clientCredentials(
axios.create(),
'https://oauth.com/2.0/token',
'CLIENT_ID',
'CLIENT_SECRET'
)
const auth = await getClientCredentials('OPTIONAL_SCOPES')
// => { "access_token": "...", "expires_in": 900, ... }
axios.get(API_ENDPOINT,
headers: {
Authorization: `Bearer ${auth.access_token}`
}
)
INFO
Always add your Subscription key
to the request.
js
axios.post(API_ENDPOINT,
headers: {
'Ocp-Apim-Subscription-Key': 'd484a1f0d34f4301916d0f2c9e9106a2'
}
)
axios.post(API_ENDPOINT,
headers: {
'Ocp-Apim-Subscription-Key': 'd484a1f0d34f4301916d0f2c9e9106a2'
}
)
js
const res = await axios.post(API_ENDPOINT, {
params: {
Ocp-Apim-Subscription-Key: 'd484a1f0d34f4301916d0f2c9e9106a2'
}
});
const res = await axios.post(API_ENDPOINT, {
params: {
Ocp-Apim-Subscription-Key: 'd484a1f0d34f4301916d0f2c9e9106a2'
}
});
Path Parameters Values
Name | Type | Required | Description |
---|---|---|---|
id | string(uuid) | yes | The Unique ID of a Phone Number verification request |
Response
Response Values
Content type
application/json
Name | Type | Description |
---|---|---|
id | string (uuid) | The unique id for the request |
createdAt | string (date-time) | Date the request was created. |
requesterId | string or null | The unique Id for the request initiator |
status | string (Enum: Pending , Completed , Error ) | The status of the execution |
verificationStatus | string (Enum: Unknown , Valid , Invalid ) | The verification status reply |
phoneNumber | string or null | Phone number sent in request payload. |
sentAt | string or null (date-time) | Date the request was sent. |
referenceId | string or null | Reference Id sent in the verification request. |
responsePayload | string or null | String containing a verification response. |
processedAt | string or null (date-time) | Date at which the verification request was processed. |
errorCode | string or null | The code of the error returned. |
errorMessage | string or null | The Description of the error returned. |
Example Response Body
json
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"createdAt": "2019-08-24T14:15:22Z",
"requesterId": "string",
"status": "Pending",
"verificationStatus": "Unknown",
"phoneNumber": "string",
"sentAt": "2019-08-24T14:15:22Z",
"referenceId": "string",
"responsePayload": "string",
"processedAt": "2019-08-24T14:15:22Z",
"errorCode": "string",
"errorMessage": "string"
}
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"createdAt": "2019-08-24T14:15:22Z",
"requesterId": "string",
"status": "Pending",
"verificationStatus": "Unknown",
"phoneNumber": "string",
"sentAt": "2019-08-24T14:15:22Z",
"referenceId": "string",
"responsePayload": "string",
"processedAt": "2019-08-24T14:15:22Z",
"errorCode": "string",
"errorMessage": "string"
}
Error Response
400 Bad Request
application/json
Name | Type | Description |
---|---|---|
statusCode | integer(int32) | The status of the error response |
Example Error Response
json
{
"statusCode": 0
}
{
"statusCode": 0
}
401 Unauthorized
application/json
Name | Type | Description |
---|---|---|
statusCode | integer(int32) | The status of the error response |
Example Error Response
json
{
"statusCode": 0
}
{
"statusCode": 0
}
500 Server Error
No response