Get answers quicker by searching

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Getting the API response after doing a subscribe
  • Vote Up0Vote Down GhoroGhoro
    Posts: 2Sendy user

    Hello,

    I realize this maybe more of a PHP question then a Sendy question, but after a lot of searching I'm just stuck.

    Using the example provided on the Sendy API page I am able to subscribe an email no problem. However the example never shows how to handle cases where the email is invalid or is already subscribed and how to get the response that is sent back.

    From the searching I have done online I thought that the response would be in $http_response_header, but when doing var_dump I don't see anything withing $http_response_header that holds the error message. Below is the string after doing var_dump on $http_response_header as well as my current code.

    Thanks.

  • 1 Comment
  • Vote Up0Vote Down BenBen
    Posts: 3,489Sendy support

    Hi,

    The 'subscribe' API returns a plain text response. As written in the API page, here are all the responses:

    I suggest downloading the example scripts to explore usage:

    Thanks.

    Best regards,
    Ben

This discussion has been closed.
All Discussions