Validate a license key from your customer.”
https://test-api.creem.io/v1/licenses/validate
{ "id": "<string>", "mode": "test", "object": "<string>", "status": "active", "key": "ABC123-XYZ456-XYZ456-XYZ456", "activation": 5, "activation_limit": 1, "expires_at": "2023-09-13T00:00:00Z", "created_at": "2023-09-13T00:00:00Z", "instance": [ { "id": "<string>", "mode": "test", "object": "license-instance", "name": "My Customer License Instance", "status": "active", "created_at": "2023-09-13T00:00:00Z" } ] }
const validateLicense = async (licenseKey, instanceId) => { const response = await fetch('https://test-api.creem.io/v1/licenses/validate', { method: 'POST', headers: { 'accept': 'application/json', 'x-api-key': 'YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ key: licenseKey, instance_id: instanceId }) }); return await response.json(); }
curl -X POST https://test-api.creem.io/v1/licenses/validate \ -H "accept: application/json" \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "key": "MYAPP_12345", "instance_id": "inst_xyz123" }'
import requests def validate_license(license_key, instance_id): url = "https://test-api.creem.io/v1/licenses/validate" headers = { "accept": "application/json", "x-api-key": "YOUR_API_KEY", "Content-Type": "application/json" } data = { "key": license_key, "instance_id": instance_id } response = requests.post(url, json=data, headers=headers) return response.json()