ActiveCampaign / activecampaign-api-php

MIT License
115 stars 76 forks source link

how can i get list of all the lists using API key only? #42

Closed andyideologi closed 8 years ago

andyideologi commented 8 years ago

i need to get all the lists using API key so that i can add leads to particular list.

molinto commented 8 years ago

https://SUBDOMAIN.api-us1.com/admin/api.php?api_key=API_KEY&api_action=list_list&api_output=json&ids=all&full=1

http://www.activecampaign.com/api/example.php?call=list_paginator

mattpramschufer commented 8 years ago

Just to follow up on molinto's comment Using this Library you would do something like

public function getAcLists() {
        $params = [
            'ids'  => 'all',
            'full' => '1'
        ];
        $lists  = $this->ac()->api( "list/list_", $params );
        return $lists;
}
andyideologi commented 8 years ago

thanks molinto , i found list paginator link helpful for me. And thank you mattpramschufer for the code.

cptiwari20 commented 3 years ago

Thanks @mattpramschufer for sharing the idea.