Unlocator API Documentation
The Unlocator API is intended for developers building 3rd party apps, which integrate with the Unlocator service.
API Key: Unique user key, found in the Unlocator members area of each user.
Channels /Regions: The channels that support region changes, alongside what countries are supported can be seen here: https://unlocator.com/tool/regions.xml.
regions.xml: The regions.xml file listed above is updated when new channels with region support or new regions for existing are added. Therefore, it should be used to auto-create the dropdown box and to auto-populate those fields. Otherwise, the app will need to be manually updated.
URL: ex https://unlocator.com/tool/api.php
The API is based on a simple HTTP POST request of the API URL with the API Key sent in the request body. Both the short URL and the long URL can be used.
The API responses are pretty primitive. If you prefer to have some more advanced responses, please do provide feedback and we can discuss this. This goes for the whole API. i.e. this API was created for you, the developer. If there is something that needs to be improved, changed or fixed, please do provide feedback and we will seriously look into it.
API Call to Update IP
Unlocator servers only serve authorized IPs with subscription-based content, as a result, a user needs to either keep their IP updated in the Unlocator servers through the member's area or using the following HTTP POST API call:
curl -X POST -d'api_key=79fas7a5sdfbacas07' https://unlocator.com/tool/api.php
This checks for the validity of key, if the IP already exists or not, and updates the IP in our servers if the key is valid and IP is not in use.
Note: Please do not use an update interval lower than 15 mins for this feature
API Call to Change Region
￼￼￼Unlocator provides a feature that allows a user to change the content region of a specific channel. For example, a user can go to his member's area to choose to watch Netflix in GB or USA. The API does support this feature as well, please see the below
Channels/Regions: The channels that support regions changes, alongside what countries are supported can be seen here: https://unlocator.com/tool/regions.xml
This file is best used to autogenerate the supported channels and their regions. As Unlocator is constantly adding new channels with multiregion support, this would save the developer from having to upgrade the app just for the sake of adding a new channel. So this file can be read on app startup or refreshed once daily and the channels and their regions can be auto-populated.
The contents of the XML file are then used to call the API URL with the following additions
- channel=netflix or channel=amazon , etc as per XML file sub entries of channels.
- country=br or country =us, etc as per XML file child entries of the listed channels.
As a result, an example URL that can be used by the user to change his Netflix region to the USA is
curl -X POST -d '79fas7a5sdfbacas07' https://unlocator.com/tool/api.php?country=us&channel= netflix
If the user IP is not added, the region change call will auto-update the IP automatically.