首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >从Sendy API获取活跃用户数时出错

从Sendy API获取活跃用户数时出错
EN

Stack Overflow用户
提问于 2018-12-26 19:30:34
回答 1查看 214关注 0票数 1

尝试从Sendy API获取活动订阅者计数时,我收到以下错误

POST请求如下所示:

代码语言:javascript
复制
http://my-sandy-Installation/api/subscribers/active-subscriber-count.php

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

正文部分:

代码语言:javascript
复制
api_key= mykey
list_id= mylistid

有人能帮帮忙吗?

EN

回答 1

Stack Overflow用户

发布于 2020-02-24 20:19:20

代码语言:javascript
复制
$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);
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53931485

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档