1

在尝试从 Sendy API 获取活动订阅者数量时,我收到以下错误 在此处输入图像描述

POST请求如下所示:

http://my-sandy-Installation/api/subscribers/active-subscriber-count.php

在标题中:Content-Type:application/x-www-form-urlencoded

在正文中:

api_key= mykey
list_id= mylistid

有人可以帮忙吗?

4

1 回答 1

0
$boolean = 'true';
$postdata = http_build_query(
    array(
    'email' => $email,
    'api_key'=>'your api_key',
    'list' => 'Your List id',
    'boolean' => 'true'
    )
);

$opts = array('http' => array('method'  => 'POST', 'header'  => 'Content-type: application/x-www-form-urlencoded', 'content' => $postdata));
$context  = stream_context_create($opts);
$result = file_get_contents($your_installation_url.'/subscribe', false, $context);
于 2020-02-24T12:19:19.790 回答