Quick Start
Get your first license activated in under 5 minutes.
Step 1: Get Your API Key
- Log in to your ThriveTech Dashboard
- Navigate to Settings → API Keys
- Click Create API Key
- Copy and securely store your key
bash
# Your API key looks like this:sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Step 2: Test Your Connection
bash
curl -X GET https://api.thrivetechservice.com/api/v1/platform/plans \-H "Authorization: Bearer YOUR_API_KEY"
Step 3: Activate a Trial License
When a user first installs your application, offer them a trial:
javascript
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
Step 4: Validate a License
Validate periodically — recommended at app startup and every 24 hours:
javascript
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
Step 5: Activate a Purchase
After a user purchases through your integrated store:
javascript
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'}})});
Step 6: Handle Device Deactivation
Allow users to deactivate a device to free up slots:
javascript
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'})});
Common Error Codes
| 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 |
Device Fingerprinting
Generate a unique, stable device identifier:
- Desktop: Hardware ID, machine GUID, or disk serial
- iOS:
UIDevice.identifierForVendor - Android:
Settings.Secure.ANDROID_ID
The fingerprint should be consistent across app reinstalls, unique per device, and not personally identifiable. Minimum 16 characters.
Next Steps
- Authentication — Detailed API key management
- Integration Guide — SDK setup and core workflows
- Error Handling — Comprehensive error handling
- Activation API — Full API reference
Was this helpful?
