-
-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
I'm having all sorts of issues with the API and can't tell if it's just me or if the documentation is out of date.
First, I'm unable to connect with:
client = ::ActiveCampaign::Client.new(
api_url: 'YOUR-ENDPOINT', # e.g. 'https://youraccount.api-us1.com/api/3'
api_token: 'YOUR-API-KEY')
I have to use api_endpoint and api_key instead of api_url and api_token and it doesn't work at all with the /api/3 endpoint. I have to point it at /admin/api.php. This isn't documented anywhere. I had to parse it together from support requests and a lot of hacking.
Once I'm actually connected to the API, I can hardly make any calls. For example, I've tried every possible variation I can think of to retrieve all lists:
client.lists, client.get_lists, client.list.
They all generate a version of:
client.show_lists =>
NoMethodError: undefined method `show_lists' for #<ActiveCampaign::Client:0x00007fbaede2b6c0>
The only thing that generates a response is client.list_list which gives me the following:
=> {"result_code"=>0,
"result_message"=>"Failed: Nothing is returned",
"result_output"=>"json",
"results"=>[]}
shenst1
Metadata
Metadata
Assignees
Labels
No labels