Hi,
I've written a function using Google Apps Script to create an organization in Meraki but received above error saying there's a problem in the JSON.
I was able to GET data from Meraki but unable to PUT data using below format.
Any advice why this is happening?
function createOrg(orgName)
{
var org =
{
"name": orgName
};
var URL = "<a href="https://api.meraki.com/api/v0/organizations" target="_blank">https://api.meraki.com/api/v0/organizations</a>";
var params =
{
headers:
{
"X-Cisco-Meraki-API-Key": settings.apiKey,
"Content-Type": "application/json",
"Accept": "*/*"
},
method: "PUT",
payload: org,
muteHttpExceptions: true
}
var response = UrlFetchApp.fetch(URL, params);
Logger.log(response);
}