已配置LinkedIn Lead Sync API Webhook,测试生成线索时未触发调用
LinkedIn Lead Sync Webhook 故障排查
问题背景
已按官方规范配置LinkedIn线索同步Webhook,注册请求返回201成功,且能定期收到LinkedIn的GET挑战请求,但测试广告生成线索时未收到POST通知;同时开发者门户中找不到文档提及的「Webhook tab」。
已完成配置详情
权限与应用设置
- 开发者账号拥有Campaign Manager「Account Manager」权限、公司主页「Content Admin」权限
- 应用已开通对应产品权限
- 使用的Bearer Token包含权限:
r_ads、r_marketing_leadgen_automation、openid、profile、r_liteprofile、r_events、r_organization_admin、r_ads_leadgen_automation、email
Webhook注册请求
- 请求URL:
https://api.linkedin.com/rest/leadNotifications - 请求头:
LinkedIn-Version: 202308X-Restli-Protocol-Version: 2.0.0
- 请求体:
{ "webhook":"https://{apim}.azure-api.net/{func}/LinkedinTrigger?subscription-key={{apimSecret}}", "owner":{ "sponsoredAccount": "urn:li:sponsoredAccount:{accountId}" }, "associatedEntity":{ "sponsoredCreative": "urn:li:sponsoredCreative:{creativeId}" }, "leadType":"SPONSORED" } - 注册结果:返回201状态码,响应头含
Location: /leadNotifications/{createdLeadNotificationId},每2小时可收到带challengeCode的GET挑战请求
问题排查与解决方案
1. 未收到POST线索通知的排查
验证线索关联资源正确性
确认测试生成的线索确实归属到注册时指定的sponsoredCreative和sponsoredAccount,可在Campaign Manager中查看线索的关联广告详情。
检查Webhook端点可用性
- 确保端点能正确处理POST请求并返回200状态码,LinkedIn对失败请求会重试,但多次失败后会暂停推送
- 检查APIM和后端函数的日志,确认是否存在POST请求被拦截(如订阅密钥验证失败、防火墙规则限制)
确认Webhook注册状态
调用GET /leadNotifications/{createdLeadNotificationId}接口,验证注册配置是否与提交的请求体一致,检查是否存在状态异常。
检查LinkedIn端推送记录
在Campaign Manager的线索同步模块查看推送日志,若存在失败记录,根据错误信息调整配置。
2. 「Webhook tab」不可见的说明
该标签属于旧版开发者门户功能,已被当前的REST API注册方式取代,无需关注此界面差异,通过leadNotifications接口注册Webhook是目前的官方标准方式。
内容的提问来源于stack exchange,提问作者Joel Lopes
相关产品推荐
相关产品推荐

