Gmail操作架构更改 [英] Gmail Action Schema changes
问题描述
我可以成功注册Gmail标记,但是当我点击Gmail操作按钮时,承载标记根本不会显示在我的后端,gmail会显示以下消息:
I was able to successfully register for Gmail Markups, but when I clicked on the Gmail action button, the bearer token doesnt appear in my backend at all, and gmail displays this message:
无法向mywebsite.com发送请求。
Unable to send request to mywebsite.com.
但是当我尝试发送通过curl,使用从google app引擎获取的承载令牌。它正常工作,但显示错误信息!
But when I try sending it through curl, using the bearer token gotten from google app engine. It works correctly but shows an error message! Here's the schema I got from show Original that was in the email.
<script type=3D"application/=
ld+json">{"@context":"http://schema.org","@type":"EmailMessage","potentialA=
ction":{"@type":"ConfirmAction","name":"Complete Registration","handler":{"=
@type":"HttpActionHandler","url":"https://www.mywebsite.com/verify.php?hash=3D9a417a5878e1b5555b9b32a18e663695&id=3D116424&co=
de=3DitckU314q5SAjLFQ"}},"description":"Verify your account."}</script>
我研究了一下这个,似乎Nginx把使用下划线的头部视为无效和丢弃他们。如果是这样的话,那么为什么我的下面卷曲作品
I researched a bit about this, and it seems that Nginx treats headers that uses underscores as invalid and discards them. If that's the case then why does my curl below works?
curl -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjgwNmFlMDIxZjNmZDA5M2EzYWIzODE1NjQwMzUzMjhiMDQ0MjNlNmYifQ.eyJpc3MiOiJhY2NvdW50cy5nb29nbGUuY29tIiwiaWQiOiIxMDM4OTA4MTcyOTU4MDYwNTQwNTIiLCJzdWIiOiIxMDM4OTA4MTcyOTU4MDYwNTQwNTIiLCJhenAiOiJnbWFpbEBzeXN0ZW0uZ3NlcnZpY2VhY2NvdW50LmNvbSIsImVtYWlsIjoiZ21haWxAc3lzdGVtLmdzZXJ2aWNlYWNjb3VudC5jb20iLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiYXVkIjoiaHR0cHM6Ly9kZXZlbG9wbWVudC5nbWFpbC5jb20iLCJ2ZXJpZmllZF9lbWFpbCI6dHJ1ZSwiY2lkIjoiZ21haWxAc3lzdGVtLmdzZXJ2aWNlYWNjb3VudC5jb20iLCJpYXQiOjE0MzEwNjg2NTIsImV4cCI6MTQzMTA3MjI1Mn0.e1gD2DNST-EbkVvMzjpB7OBtQBoSUR3p6obhsrUVIYMAkm6KHkqs_xL1aJd37IX-03oIMuZNbBV3LVA24y_z527Jm9T1tnKjvMh7_lfFu0jjj_1aasccK7F25mgBJUvRrz5EVQLOoEpkCp_dvkq7qRTpDsuNhA3uaZn_KG5QirY" 'https://www.mywebsite.com/verify.php?hash=499a60a4b6bca7f1ef7e9e8fd905cc4a&id=9999&code=5RbCyniJQKhLqZAd'
推荐答案
除了请求将Gmail操作的电子邮件列入白名单之外,您还必须要求将 Bearer Tokens 。
Along with requesting to be whitelisted for your email for Gmail actions, you have to request to be whitelisted for Bearer Tokens as well.
这篇关于Gmail操作架构更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!