【问题标题】:How to get dynamic template data from sendgrid api如何从 sendgrid api 获取动态模板数据
【发布时间】:2021-02-03 16:37:22
【问题描述】:

我正在使用 Sendgrid API 来获取所有动态模板的列表。当我看到 API 响应不包含任何关于动态模板数据的信息时,我有点惊讶。

有没有办法从 sendgrid API 获取动态模板数据

示例:我的动态模板包含此动态数据:

  • {{ 名字 }}
  • {{姓氏}}
  • {{ 链接}}

我想在查询 sendgrid API 时取回这些数据:

[GET]https://api.sendgrid.com/v3/templates/{{templateID}}

感谢您的宝贵时间!

【问题讨论】:

  • 你有没有想过这个问题?我也想知道这是否可能。
  • 嗨..你找到了吗?我也需要这个解决方案

标签: sendgrid sendgrid-api-v3 sendgrid-templates


【解决方案1】:

解决方案是使用Sendgrid Docs中提供的URL,但带有一个特殊的查询参数?generations=dynamic

因此最终 URL 如下所示:

https://api.sendgrid.com/v3/templates?generations=dynamic

很高兴找到这个,因为我也找了很久。

【讨论】:

  • 半年后我又回到了自己的答案。很高兴我能再次帮助自己!
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-04-28
相关资源
最近更新 更多