ActiveCampaign Forum

Alternative to XMLHttpRequest in Java Script Code Snippet


We are attempting to build an API plugin from Google Data Studio to Active Campaign to create dynamic dashboards for our clients. Your Developer page provides some Code Snippets however I am having difficulties integrating these to the Google Script, as XMLHttpRequest is not supported over Google Scripts. Do you know of an alternative?

Also how can I integrate:
curl -H “Api-Token: YOUR_TOKEN”

in Java Script.


Thanks for reaching out. While we cannot assist with the actual coding of the connection here are a few things that should help.

One thing we see is that you are using an endpoint that should be the account URL: It should be able to be added here:

There are free resources out there that should help transform that to JS, such as:

Also this token is your KEY:

If you require further assistance you can work with our certified consultant who can be found here: