Please open the api.php file first, and locate this line : define('UNLOCKBASE_API_KEY', '(XXXX-XXXX-XXXX-XXXX)') And replace the X’s with your API key (see “Creating my API key” above), for example : define('UNLOCKBASE_API_KEY', '(0123-4567-89AB-CDEF)') If the cURL extension is missing, the UnlockBase library will complain about this. To check if you have cURL installed, please just try to execute the api.php file under your hosting environment. There are important chances that this library is already installed on your system if not, you can ask your system administrator or hosting company to do it for you. You need to have the cURL library installed. Older versions are deprecated and not supported. You must have PHP4 or PHP5 installed on your system. The PHP 4/5 library For quicker integration into your PHP applications, we provide an easy to use PHP library. If an error occurs anywhere in the API, a single tag will be shown: Description of the error XML Structure is further detailed in each Action description.
You can obviously use any other XML parser in any programming language. We provide a PHP 4/5 library, that automatically parses this stream for you. XML stream format The XML stream always conforms to this template: … There is no parameters on XML tags, such as You will only encounter simple A tag can contain either a value (“character data”, in fact a simple string) : Value Or contain other tags : … But not both : Value … This makes XML parsing easy. Other parameters will be required for certain services, please read the detailed information for each Action. All API queries must be sent with at least two parameters:. The different services provided by the API are identified as Actions. The server returns an easy-to-read XML stream. All exchanges with the API are encoded in UTF-8. Technical information The API is located at All queries are sent via the HTTP POST method. Please note that in this case, any key previously generated will instantly become inactive!
For security purposes, you can regenerate it at any moment. This key, just as your UnlockBase password, must be kept secret. If not, just click on the “Generate my API key” button. If you have already created your API key, it is displayed here. Please note that this API is intended to be used with the IMEI service only, and does not permit to control other services like cable servers or file servers.Ĭreating my API key Please log in on then click on the “XML API” icon in the bottom-right menu. The API is XML-based, platform-independent, and can be integrated on any OS in any programming language. To deliver unlock codes to your customers, you have the choice to parameter your default delivery emails on the UnlockBase website, or to use a back office or a cron job to periodically check if a specific order has been delivered, and act accordingly.
#UNLOCKBASE COM CODE#
You can integrate the API in your front office, like an unlocking website, to place directly your customers’ orders on the UnlockBase server, as well as in your back office, to cancel or retry orders, or to request a code verification. You can now order unlock codes, check if an order has been delivered, load your order history, cancel orders, and much more, directly from your own website, without having to log in on. UnlockBase API version 2.0 allows your applications to communicate directly with the UnlockBase™ server. © Milton Worldwide Media LLC UnlockBase API Version 2.0