Get your first license activated in under 5 minutes.
# Your API key looks like this:sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
curl -X GET https://api.thrivetechservice.com/api/v1/platform/plans \-H "Authorization: Bearer YOUR_API_KEY"
When a user first installs your application, offer them a trial:
const response = await fetch('https://api.thrivetechservice.com/api/v1/activate/trial', {method: 'POST',headers: {'Content-Type': 'application/json','X-Channel-API-Key': 'your-channel-api-key'},body: JSON.stringify({deviceFingerprint: 'unique-device-identifier',deviceInfo: {type: 'desktop',osType: 'Windows',osVersion: '11',appVersion: '1.0.0'},userInfo: {email: 'user@example.com'}})});const result = await response.json();// Store result.activation.licenseToken securely
Validate periodically — recommended at app startup and every 24 hours:
const response = await fetch('https://api.thrivetechservice.com/api/v1/activate/validate', {method: 'POST',headers: {'Content-Type': 'application/json','X-Channel-API-Key': 'your-channel-api-key'},body: JSON.stringify({licenseToken: 'stored-license-token',deviceFingerprint: 'unique-device-identifier'})});const result = await response.json();// result.valid === true, result.license.features for feature gating
After a user purchases through your integrated store:
const response = await fetch('https://api.thrivetechservice.com/api/v1/activate/purchase', {method: 'POST',headers: {'Content-Type': 'application/json','X-Channel-API-Key': 'your-channel-api-key'},body: JSON.stringify({deviceFingerprint: 'unique-device-identifier',deviceInfo: { type: 'desktop', osType: 'Windows', appVersion: '1.0.0' },storeReceipt: {channelType: 'direct', // or 'microsoft_store', 'google_play', 'apple_app_store'receiptData: 'XXXX-XXXX-XXXX-XXXX'}})});
Allow users to deactivate a device to free up slots:
await fetch('https://api.thrivetechservice.com/api/v1/activate/deactivate', {method: 'POST',headers: {'Content-Type': 'application/json','X-Channel-API-Key': 'your-channel-api-key'},body: JSON.stringify({licenseToken: 'stored-license-token',deviceFingerprint: 'device-to-deactivate',reason: 'User requested deactivation'})});
| Code | Description | Resolution |
|---|---|---|
invalid_api_key | Invalid or missing API key | Verify key in dashboard |
invalid_license | License key not found | Check the license key |
license_expired | License has expired | Prompt user to renew |
device_limit_reached | Max devices already activated | Deactivate another device |
trial_already_used | Trial already used on this device | Prompt for purchase |
rate_limit_exceeded | Too many requests | Implement backoff |
Generate a unique, stable device identifier:
UIDevice.identifierForVendorSettings.Secure.ANDROID_IDThe fingerprint should be consistent across app reinstalls, unique per device, and not personally identifiable. Minimum 16 characters.
Was this helpful?