Is there an API that works in 3.x?

Questions about Version 3 phpList features (the answer is probably 'Yes!')
Forum rules
Please help the volunteers to help you by supplying the version of phpList you are using, browser & version and if possible, a link to your phpList installation.

Is there an API that works in 3.x?

Postby balidave » 8:22am, Mon 03 Mar, 2014

There was an API for PHPList originally developed by Ravi that worked in 2.x (see e.g. viewtopic.php?f=7&t=5009 )I've been using it for years - it allows you to create/delete/modify users and more. Has anyone had any experience trying to use this with 3.x? Or any other API developments that will now work?
balidave
phpLister
 
Posts: 12
Joined: 7:14am, Wed 19 Jul, 2006

Re: Is there an API that works in 3.x?

Postby duncanc » 1:54pm, Tue 04 Mar, 2014

This plugin https://github.com/EkAndreas/phplistapi works with phplist 3,although you will need to have a close look to see whether it includes all the functions that you need.

There are actually two plugins there, and the second one REST API Test, doesn't seem to work with phplist 3.
duncanc
Moderator
 
Posts: 2440
Joined: 6:34am, Sat 08 May, 2010
Location: London

Re: Is there an API that works in 3.x?

Postby duncanc » 2:09pm, Tue 04 Mar, 2014

The Rest API Test plugin requires the curl extension to be installed in php, and will just fail if it is not.
You don't need the curl extension for the main plugin though.
duncanc
Moderator
 
Posts: 2440
Joined: 6:34am, Sat 08 May, 2010
Location: London

Re: Is there an API that works in 3.x?

Postby balidave » 8:24am, Thu 06 Mar, 2014

Thanks duncanc, but I don't think (?) that solves my problem since I'm wanting to do things behind the scenes totally without the normal PHPList "doing its' thing", e.g. sending a confirmation email for a new subscription. Typically I need to silently add a subscriber (e.g. they made a purchase) IF that email doesn't exist, or modify the subscriber's attributes or update the email address.

I am not familiar with using REST but it appears I'd just issue commands to hit the PHPList pages used as if I were doing this from the admin interface. So I'd have to build structures to hit the appropriate pages for each of the operations I needed.

The old API I used, and I suspect it may still work tho perhaps with some bugs, just had addMember, modifyMember, deleteMember, .... (not the real names) member fns of the class object that was instantiated. I may have to just try this one but I was hoping someone had some experience with it or something equivalent.

Let me know if I'm missing something or there's another solution.
balidave
phpLister
 
Posts: 12
Joined: 7:14am, Wed 19 Jul, 2006

Re: Is there an API that works in 3.x?

Postby jimlongo » 7:04pm, Sat 08 Mar, 2014

I got the restapi_test to run as follows in phpList v3.

add the admin username and password to Config->Settings->develop settings->

then access . . .
Code: Select all
http://mydomain.com/list/admin/?page=main&pi=restapi_test


Although the author just stated on github, "The lib is open and free.
Just written for version 2 of phpList. No plans to upgrade."
jimlongo
PL Geek
 
Posts: 88
Joined: 10:10pm, Tue 15 May, 2007

Re: Is there an API that works in 3.x?

Postby balidave » 5:47am, Sun 09 Mar, 2014

@jimlongo: Thanks, but I don't think that helps me for what I need. I'm hoping someone got the old API I used before working with v3.
balidave
phpLister
 
Posts: 12
Joined: 7:14am, Wed 19 Jul, 2006


Return to Does phpList do this?

Who is online

Users browsing this forum: No registered users and 3 guests