LOCK
Google Apps Script with Meridian
Use UrlFetchApp.fetch to call Meridian endpoints directly from Sheets, Forms, or any GAS runtime.
Quickstart
function callMeridian() {
const url = "https://api.getmeridian.net/v1/verify";
const payload = JSON.stringify({
license_key: "MK-XXXX-XXXX-XXXX",
hwid: "abc123"
});
const options = {
method: "post",
contentType: "application/json",
payload: payload,
muteHttpExceptions: true
};
const response = UrlFetchApp.fetch(url, options);
const data = JSON.parse(response.getContentText());
Logger.log("Status: " + data.status);
return data;
}Payload
| Field | Type | Required |
|---|---|---|
| license_key | string | Yes |
| hwid | string | Yes |
| metadata | object | No |
Response
{
"status": "valid",
"expires": "2026-08-15T00:00:00Z",
"tier": "pro"
}Notes
- •
muteHttpExceptionsprevents GAS from throwing on non-2xx status codes — parse the body yourself. - •GAS enforces a 30-second timeout on
UrlFetchAppcalls. - •Store your API key in Script Properties (
PropertiesService.getScriptProperties()), never hard-coded.