Submitting via API
API Upload MSISDNs
Prepare the List of Phone Numbers
Ensure the list of phone numbers is available and formatted correctly. The phone numbers must begin with the Philippines country code (63). Example format:
639170000001 639170000002 639170000003
Hash the Phone Numbers Using SHA-512
Use a tool that supports the SHA-512 algorithm to hash the phone numbers.
The CSV file should contain only one column with the hashed values of the phone numbers.
Authentication
Prerequisites
In order to obtain an API Token you first need to have client_id and client secret from the previous step.
Token Request Flow
To authenticate and obtain an OAuth token, follow the standard OAuth token request flow.
API URL
Grant Type
Use this grant type when the client is a server and does not require user authentication.
Requesting the Access Token
To request the Access Token, submit a POST request to the API URL, including the following body parameters in JSON format:
Handling the Token Response
Upon successful validation, the authorization server will respond with an access token:
Token Lifespan
Access tokens have a limited lifespan of 86400 seconds. Once the token expires, you can obtain a new one.
Endpoint: Upload MSISDNs
This API allows users to upload a list of MSISDNs (phone numbers) associated with a contributor.
URL:
POST https://sandbox-app.lenderlink.ph/api/mobile-phone/upload
Request Headers
Content-Type
application/json
Accept
application/json
Authorization
Bearer <token>
Request Body (JSON)
Validation
msisdns: Required, must be an array with a maximum of 10000 entries.
msisdns.*: Each MSISDN must be a valid string with only low case letters and digits that should be 128 in total per string.
Error Handling
If validation fails, the following type of response will be returned:
Status Code: 422 Unprocessable Entity
Server Error
If there’s an issue on the server (e.g., batch number generation fails),the response will be: :
Status Code: 500 Internal Server Error
Example Curl Request
Last updated