How to Configure Things Group to Work Only With IMEI range (TAC)?

This guide will show you how you can Enable and Disable Master IMEI settings to allow your Thing Group SIM cards to work only with one manufacturer IMEI range (TAC)

First step is to get a list of all of your Thing Groups, please use the following request:

curl -X GET "https://console.monogoto.io/thingsgroup/listWithMeasures" -H "accept: application/json" -H "Authorization: Bearer <<<_TOKEN_HERE_>>>" -H "apikey: <<<_CUSTOMER_ID_>>>"

Please note that the above shown command needs to be replaced with information: <<<_TOKEN_HERE_>>> - replace with your token. You may obtain Token, by running Login Token API command. <<<_CUSTOMER_ID_>>> - replace with your customer ID. You may obtain Customer ID when running Login Token API command If needed this API can be tested and used in the Monogoto portal following this path: Things Group GET /thingsgroup/listWithMeasures

Example of request:

curl -X GET "https://console.monogoto.io/thingsgroup/listWithMeasures" -H "accept: application/json" -H "Authorization: Bearer eyJhb6IkpXVCJ9.eyJSb2xlIjoiVXN4lclByb2ZpbGVJZF9kZGM2MThhNC0wNTI1LTQ2MmUtYWN3NzhhMGQxYmbSI6Im4zgFkbWluIiwiQ3VzdG9tsbCwiVXNlcklkIjoiVklkXzg5Yj5Y2OGEyUtNDQThhLTEzZjA0MzJhZDE3YyINTAzgZmUtZGI51My00ZjRiLTktN2U5Yjc0ZWU1ZThlIiwiaWNzM3MjI5L2MDY3NTE2Mjl9.99aSLzP7kTgK6TZGW-xalrMu0GkW6viunt3XxbNng" -H "apikey: cid_ecs1d3a5-f5e62a1-fe8af468wf"

Expected result:

[
{
"Active": 10,
"Alarm": 9,
"CustomerId": "cid_ecs1d3a5-f5e62a1-fe8af468wf",
"Data": 97803309,
"DateModified": 1612791354953,
"Networks": [
{
"NetworkId": "NetworkId_734666bd-9779-4995-9aa4-c7efd5081689",
"NetworkName": "default network for APN: data.mono"
},
{
"NetworkId": "NetworkId_b0cc888b-8350-4e58-b450-aa16d71a943e",
"NetworkName": "default network for APN: uinternet"
}
],
"RoamingPolicies": [],
"SMS": 4,
"TelephonyProfileId": "TelephonyProfile_ad766b40-9577-4d91-4679-01664c6834d9",
"TelephonyProfileName": "Default telephony profile",
"ThingsGroupDescription": "This Group has Project A SIM cards",
"ThingsGroupId": "ThingsGroupId_eej3421b0-bee1-4997-93aa-ce443ca43h347a",
"ThingsGroupName": "Project A phones",
"Voice": 0,
"total": 1
},
...

Second step will be to update Things Group settings, please use following request:

curl -X PUT "https://console.monogoto.io/thingsgroup/<<<_THING_GROUP_ID_>>>" -H "accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer <<<_TOKEN_HERE_>>>" -d "{ \"TelephonyProfileId\": \"<<<_TELEPHONY_PROFILE_>>>\", \"ThingsGroupName\": \"<<<_THINGS_GROUP_NAME_>>>\", \"IMEIPrefix\": \"<<<_IMEI_PREFIX_>>>\", \"LockMasterImei\": <<<_MASTER_IMEI_STATE_>>>}"

Please note that the above shown command needs to be replaced with information:<<<_THINGS_GROUP_ID_>>> - replace with Things Group ID, from the first step <<<_TOKEN_HERE_>>> - replace with your token. You may obtain Token, by running Login Token API command. <<<_TELEPHONY_PROFILE_ID_>>> - replace with your Things Group used Telephony Profile ID from the first step. <<<_THINGS_GROUP_NAME_>>> - replace with your Things Group used Telephony Profile ID from the first step. <<<_IMEI_PREFIX_>>> - replace with the device IMEI range, also known as a TAC. In order to restrict Things inside this Thing Group to work only with devices from this IMEI range. Please note that you can send empty value in order to remove IMEI range value. <<<_MASTER_IMEI_STATE_>>> - replace with true or false value, depending on what you want to do: true - Enable Master IMEI limitation to allow only our entered device IMEI range to get SIM card services. false - Disable Master IMEI limitation to allow all devices to work with this Thing. If needed this API can be tested and used in the Monogoto portal following this path: Things Group PUT /thingsgroup/{ThingsGroupId}

Example of request:

curl -X PUT "https://console.monogoto.io/thingsgroup/ThingsGroupId_eej3421b0-bee1-4997-93aa-ce443ca43h347a" -H "accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer eyJhb6IkpXVCJ9.eyJSb2xlIjoiVXN4lclByb2ZpbGVJZF9kZGM2MThhNC0wNTI1LTQ2MmUtYWN3NzhhMGQxYmbSI6Im4zgFkbWluIiwiQ3VzdG9tsbCwiVXNlcklkIjoiVklkXzg5Yj5Y2OGEyUtNDQThhLTEzZjA0MzJhZDE3YyINTAzgZmUtZGI51My00ZjRiLTktN2U5Yjc0ZWU1ZThlIiwiaWNzM3MjI5L2MDY3NTE2Mjl9.99aSLzP7kTgK6TZGW-xalrMu0GkW6viunt3XxbNng" -d "{ \"TelephonyProfileId\": \"TelephonyProfile_ad766b40-9577-4d91-4679-01664c6834d9\", \"ThingsGroupName\": \"Project A phones\", \"IMEIPrefix\": \"35305311\", \"LockMasterImei\": true}"

Expected response (should show Thing Group ID):

ThingsGroupId_eej3421b0-bee1-4997-93aa-ce443ca43h347a