javascript - API for autopilot -


i newbie @ using api's. because of work, have learn use autopilothq. there api in javascript:

http://developers.autopilothq.com/

but question basically, how implement these functions? have make administration site, implement these functions, or in online program called from?

for example, in console of site autopilot, can type following:

var sessionid = autopilotanywhere.sessionid; sessionid; 

then 24 digit number. number can attached contact_id. how execute line of code on site? should make js file , make functions in here, call script head tag?

updated question: image on javascript

if want use javascript access api, create html document contains javascript script xmlhttprequest (ajax) request rest-api code 1 example in screenshot.

you need specify private api key (it acts kind of username , password in 1 thing) allow script access account. create request body , use http method send request (see crud). api returns json encoded string (or error) can work in script.

so yes, can create administrative website implements functionality make changes account (or whatever api allows do). api allows more can used programming language, create native mobile or desktop app. allow users unsubscribe themselves if api allows create api keys restrictions (i.e. allow unsubscribe action key user uses).

keep in mind not expose api key. if create website work api, make sure not store key in script can view source file. instead can either provide key via php after successful login or have @ server-side javascript (e.g. node.js) or think of else.


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -