View an HLR

In this Lookup API Quickstart, we'll show you how to programmatically view an HLR via the Lookup API.

Step 1: Request an HLR

Did you complete the Lookup Quickstart: Request an HLR?

  • No! It's a prerequisite, so make sure to do so before continuing.
  • Yes! Great, go to step 2.

Step 2: View your first HLR

Next, enter your credentials and mobile number to the below snippet and copy it to your terminal. Now, hit enter!

curl -X GET \
-H 'Authorization: AccessKey YOUR-API-KEY'
Notification icon

You can access and manage your credentials in the MessageBird Developer Dashboard.

Step 3: View the response

Now, let’s view MessageBird’s HTTP response to your API call. If the set up was correct, you will receive a response similar to this:

"details": {
"status_desc": null,
"imsi": "204080010948431",
"country_iso": "NLD",
"country_name": "Netherlands",
"location_msc": "316530",
"location_iso": 'nl',
"ported": 0,
"roaming": 0

If something went wrong, you’ll receive an error response from the MessageBird API. Don't worry, head over to Troubleshooting Lookup to understand the error.

Congrats! You can now programmatically view an HLR with MessageBird's Lookup API using cURL.


We’re always happy to help with code or other doubts you might have! Check out our Quickstarts, API Reference, Tutorials, SDKs, or contact our Support team.

Cookie Settings