Code Monkey home page Code Monkey logo

Comments (5)

mthommes avatar mthommes commented on July 23, 2024

Hi, what error is it returning?

from activecampaign-api-php.

mthommes avatar mthommes commented on July 23, 2024

When I test this on my own installs, I sometimes get this response:

{
"result": false,
"result_code": 0,
"result_message": "Message not sent",
"result_output": "json",
"success": 0,
"error": "Message not sent"
}

But this only happens if I use a campaign that doesn't have a message associated with it yet (you can check through the admin interface when editing the campaign).

I also tested using a scheduled campaign, but did not notice the issue.

Let me know if you have more details (so I can replicate) and I'd love to get the issue fixed.

Thanks!

from activecampaign-api-php.

alex-reid avatar alex-reid commented on July 23, 2024

that's the error that I'm getting.

It's too late for me to do anything about it at the moment (i'm in aus, so it's past midnight!)
could it be a problem with me using 0 as a message id?

the campaign definitely had a message attached to it, as the function that I have built requires a campaign ID and message id before it will allow a test to be sent. I switched over from using the correct message id to using 0, but even with the correct message id put in place, I'm still returning:

{
  "result": 0,
  "result_code": 0,
  "result_message": "Message not sent",
  "result_output": "json",
  "success": 0,
  "error": "Message not sent"
}

I just tested through the api explorer from the admin page and i'm getting the same response. Even on campaigns that were successfully delivered previously

the only other factor that I can think of was that the account lapsed and was re-activated. I've updated the api key as a result. not sure if this would affect old campaign ids though...

from activecampaign-api-php.

mthommes avatar mthommes commented on July 23, 2024

Just an update for anyone else following this thread - campaign_send will only work if the campaign has sent already (completely finished and sent). If you are trying to use campaign_send prior to sending the actual campaign, it will return "Message not sent."

from activecampaign-api-php.

rubenwebs avatar rubenwebs commented on July 23, 2024

For me it works on a campaign that's still in the conceptual phase when I use this method:
$sResponse = $this->cAC->api('campaign/send?email=' . $sEmail . '&campaignid=' . $iCampaignId . '&messageid=' . intval($iMessageId) . '&type=mime&action=send');

But the receiver (contact) must be in the linked list, otherwise it doesn't work.

from activecampaign-api-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.