API for Announce lists


#1

For a couple of years now I’ve had an API php document that has been working well, … up until last week. Support told me that I wasn’t passing the “name” field, which is required. They said that the reason it worked for the last couple of years was because: “We let that slide for a while, but we’re in the process of cleaning up the code on our end, and are enforcing proper API coding. That’s why you noticed the change recently even though you didn’t modify your code.”

As I looked at my API document, I thought I was passing the name field. But it seems that I was passing the “listname” field. This has cause some confusion on my part that support hasn’t made clear to me. So, I’m seeking some help from this forum. I need to get the API running since I can’t manually send out my “newsletters” since I’ll be out of the country for a couple of weeks in another week and a half.

Here’s a partial list of what I have in my API document now:
/* Announcement List name and domain from DreamHost Web Panel /
/
e.g. listname@domain */
define(“API_LISTNAME”, “jcac”);
define(“API_DOMAIN”, “cmachurch.org”);

And here’s what I “think” I need to have in there:
/* Announcement List name and domain from DreamHost Web Panel /
/
e.g. listname@domain /
define(“API_LISTNAME”, “jcac”);
define(“API_DOMAIN”, “cmachurch.org”);
/
name : the name for the list to use, like: “list name” list@domain.com */
define(“API_NAME”, "jcac@cmachurch.org");

According to my control panel my listname is "jcac@cmachurch.org" - But when I look at the details of my list by clicking the “edit” button, it seems that the listname is really just “jcac” because that’s that only thing that’s in the box before the domain info.

So, does anyone think this will work? My confusion comes because it seems like the API example is showing the “name” as being “like: ‘list name’ list@domain.com” but if I follow that example I’d end up with “API_NAME”, "jcac@cmachurch.org" <jcac@cmachurch.org@cmachurch.org>" - That just doesn’t look right to me.


#2

I had the same Problem

you need to pass the name as URL Encoded

just urlencode “list name” list@domain.com
and you’ll be fine


#3

Well, I’m not sure what you mean by urlencode. I’ve changed the API document to read:
define(“API_NAME”, “jcac” jcac@cmachurch.org);

We’ll see if that works! I’m still confused. . . but I’ll try.


#4

Well, it didn’t work. The error returned was for the line quoted above. It said: Parse error: syntax error, unexpected ‘@’ in /pathtoapi/selahapi.php on line 9

I tried eliminating the jcac@cmachurch.org text but that didn’t work either. I then got the error: Invalid API command parameters

This is driving me batty and I can’t seem to find any example APIs to look at, or figure out what “little thing” I’m missing.


#5

#6

thanks