Home Forums Newsletter Plugin Support How to force Double Opt-in when using Curl -X POST … ?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #181548
    Anonymous
    Inactive

    Hello,

    Is there a way to force the Newsletter Tool to send a confirmation email when adding subscribers via CURL?

    Synthax works ok:

    curl -X POST -H “Content-Type: application/json” https://[MY SITE]/wp-json/newsletter/v1/subscribers/add -d ‘{“api_key”:” [ API KEY ] “, “email”:”example@example.com”, “name”:”Name1″, “gender”:”m”, “status” : “S”}’

    The call adds a “Non Confirmed” subscriber, but no confirmation email is sent.

    The Newsletter Plugin settings have a Double Opt-in enabled, and a confirmation email is sent when subscribing via the online form.

    #182254
    Stefano
    Keymaster

    The add api is just an insert into the database, is not a subscription process. You should use the “subscribe” endpoint.

    Stefano.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.