Skip to content
On this page

Get Phone Number Verification.

Endpoint for getting details of a specific Phone Number Verification request by unique id.

Endpoints

EnvironmentURL
Sandboxhttps://api-test.streamline.laboremus.ug/phone-verify/api/Verification/{id}?v=1.0
Productionhttps://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.

Subscription Key

Include your subscription key in every request using one of these methods:

MethodHeader/Parameter
Header (recommended)Ocp-Apim-Subscription-Key: <your_key>
Query parameter?subscription-key=<your_key>
bash
curl --request POST \
  --url 'https://api.example.com/endpoint' \
  --header 'Authorization: Bearer <access_token>' \
  --header 'Ocp-Apim-Subscription-Key: <your_subscription_key>' \
  --header 'Content-Type: application/json' \
  --data '{"key": "value"}'
curl --request POST \
  --url 'https://api.example.com/endpoint' \
  --header 'Authorization: Bearer <access_token>' \
  --header 'Ocp-Apim-Subscription-Key: <your_subscription_key>' \
  --header 'Content-Type: application/json' \
  --data '{"key": "value"}'
js
const response = await fetch(API_ENDPOINT, {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${accessToken}`,
    'Ocp-Apim-Subscription-Key': '<your_subscription_key>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify(data)
})
const response = await fetch(API_ENDPOINT, {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${accessToken}`,
    'Ocp-Apim-Subscription-Key': '<your_subscription_key>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify(data)
})
python
import requests

response = requests.post(
    API_ENDPOINT,
    headers={
        'Authorization': f'Bearer {access_token}',
        'Ocp-Apim-Subscription-Key': '<your_subscription_key>',
        'Content-Type': 'application/json'
    },
    json=data
)
import requests

response = requests.post(
    API_ENDPOINT,
    headers={
        'Authorization': f'Bearer {access_token}',
        'Ocp-Apim-Subscription-Key': '<your_subscription_key>',
        'Content-Type': 'application/json'
    },
    json=data
)
csharp
var client = new HttpClient();
client.DefaultRequestHeaders.Authorization =
    new AuthenticationHeaderValue("Bearer", accessToken);
client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", "<your_subscription_key>");

var content = new StringContent(
    JsonSerializer.Serialize(data),
    Encoding.UTF8,
    "application/json"
);

var response = await client.PostAsync(API_ENDPOINT, content);
var client = new HttpClient();
client.DefaultRequestHeaders.Authorization =
    new AuthenticationHeaderValue("Bearer", accessToken);
client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", "<your_subscription_key>");

var content = new StringContent(
    JsonSerializer.Serialize(data),
    Encoding.UTF8,
    "application/json"
);

var response = await client.PostAsync(API_ENDPOINT, content);
java
HttpClient client = HttpClient.newHttpClient();

HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create(API_ENDPOINT))
    .header("Authorization", "Bearer " + accessToken)
    .header("Ocp-Apim-Subscription-Key", "<your_subscription_key>")
    .header("Content-Type", "application/json")
    .POST(HttpRequest.BodyPublishers.ofString(jsonBody))
    .build();

HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
HttpClient client = HttpClient.newHttpClient();

HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create(API_ENDPOINT))
    .header("Authorization", "Bearer " + accessToken)
    .header("Ocp-Apim-Subscription-Key", "<your_subscription_key>")
    .header("Content-Type", "application/json")
    .POST(HttpRequest.BodyPublishers.ofString(jsonBody))
    .build();

HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());

Path Parameters Values

NameTypeRequiredDescription
idstring(uuid)yesThe Unique ID of a Phone Number verification request

Response

Response Values

Content type

application/json

NameTypeDescription
idstring (uuid)The unique id for the request
createdAtstring (date-time)Date the request was created.
requesterIdstring or nullThe unique Id for the request initiator
statusstring (Enum: Pending, Completed, Error)The status of the execution
verificationStatusstring (Enum: Unknown, Valid, Invalid)The verification status reply
phoneNumberstring or nullPhone number sent in request payload.
sentAtstring or null (date-time)Date the request was sent.
referenceIdstring or nullReference Id sent in the verification request.
responsePayloadstring or nullString containing a verification response.
processedAtstring or null (date-time)Date at which the verification request was processed.
errorCodestring or nullThe code of the error returned.
errorMessagestring or nullThe 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

NameTypeDescription
statusCodeinteger(int32)The status of the error response

Example Error Response

json
{
 "statusCode": 0
}
{
 "statusCode": 0
}

401 Unauthorized

application/json

NameTypeDescription
statusCodeinteger(int32)The status of the error response

Example Error Response

json
{
 "statusCode": 0
}
{
 "statusCode": 0
}

500 Server Error

No response

Tech served right