U2c Mobile API Documentation.
To authenticate requests, include an Authorization header with the value "Bearer {YOUR_API_TOKEN}".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
You can retrieve your token by calling login method.
This endpoint allows you to fetch your access token..
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/login';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'email' => 'cassie52@example.net',
'password' => 'password',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); {
"success": true,
"message": "Login Successful",
"data": {
"token": "xyzAbc374672346",
"name": "Cassie",
"address": "Gujarat ",
}
}
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/brands';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"success": false,
"message": "Unauthenticated.",
"data": null
}
The ID of the brand.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/brand/564';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"success": false,
"message": "Unauthenticated.",
"data": null
}
The ID of the brand.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/activation/plans/564';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"success": false,
"message": "Unauthenticated.",
"data": null
}
The ID of the brand.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/refill/plans/564';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"success": false,
"message": "Unauthenticated.",
"data": null
}
The ID of the plan.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/activation/plan/architecto';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"success": false,
"message": "Unauthenticated.",
"data": null
}
The ID of the plan.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/refill/plan/architecto';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"success": false,
"message": "Unauthenticated.",
"data": null
}
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/activation';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'brand_id' => 'architecto',
'plan_id' => 'architecto',
'imei' => 4326.41688,
'first_name' => 'architecto',
'last_name' => 'architecto',
'email' => 'zbailey@example.net',
'address' => 'architecto',
'city' => 'architecto',
'state' => 'architecto',
'zipcode' => 4326.41688,
'sim_type' => 'physical',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); $client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/activation-calculation';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'plan_id' => 'architecto',
'month' => 'architecto',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); $client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/refill';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'mdn' => 'bngzmi',
'plan_id' => 'architecto',
'brand_id' => 'architecto',
'amount' => 4326.41688,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); $client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/portin';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'brand_id' => 'architecto',
'plan_id' => 'architecto',
'imei' => '822569775449171',
'last_name' => 'architecto',
'email' => 'zbailey@example.net',
'address' => 'architecto',
'city' => 'architecto',
'state' => 'architecto',
'zipcode' => 4326.41688,
'sim_type' => 'esim',
'mdn' => '1374491716806',
'account_number' => 'architecto',
'account_password' => 'architecto',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); The ID of the public.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/transaction/architecto';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"success": false,
"message": "Unauthenticated.",
"data": null
}
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/esim/qr';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'brand_id' => 'architecto',
'sim_no' => 'architecto',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); The ID of the public.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/esim/qr/architecto';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"status_code": 401,
"success": false,
"message": "Unauthenticated.",
"data": null
}
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/plans/activation/month-wise';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body)); The ID of the activation.
$client = new \GuzzleHttp\Client();
$url = 'https://api2.mylightmobile.com/api/plans/activation/architecto/month-wise';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));