Android Licensing System (Step 3 of 5)
Create your first license
There are two ways to create a license, one allows you to use this site to generate licenses, the other allows you to generate a license via a single HTTP request. It's up to you which you choose
3(a). Creating licenses using an HTTP call
There are several parameters you will need to include in your HTTP call, these are;
| kid | This must be the Key Pair ID as shown on the master license key pair page |
| key | This must be the API Key you supplied when creating the key pair |
| o | A name for the owner of the license (can be anything, email address, phone number, real name, etc. ideally less than 48 characters) |
| pn (Optional) | The 'phone number you wish to lock the license to |
| did (Optional) | The Android device ID you wish to lock the license to |
| exp (Optional) | The expiry date for the license in the form yyyyMMdd (e.g. 2nd Jan 2009 would be 20090102) |
| imsi (Optional) | The IMSI of the user you want to lock the license to |
| imei (Optional) | The IMEI of the device you want to lock the license to |
| f (Optional) | A free-form string of up to 16 characters which your application will have access to (e.g. setting this to AB could indicate to your app to enabled features A and B) |
All of these parameters should be added or passed (using GET or POST) to the following URL. If you pass more than 16 character in the f field you will receive an HTTP Bad request error back (HTTP error code 400).
http://licensing.andappstore.com/AndroidApplications/license/!generate
So, for example if you wanted to create a license for noreply@funkyandroid.com locked to the phone number +4412345678 using the master key pair with the ID 123 which had an API Key of 321 you could use an HTTP GET to;
http://licensing.andappstore.com/AndroidApplications/license/!generate?kid=123&key=321&o=noreply@funkyandroid.com&pn=%2B12345678
The license will be returned in the HTTP response.
3(b). Creating licenses using this site
Once you are on the Master Key Pair page for the key pair you wish to generate the license for your can click on the "Create new license" link which will take you to a page where you can enter the information you wish to create the license for. Once you have entered the information click on the "Create" button and you the license will be created and you'll see a message giving you the license ID.