Gmail Action Schema changes

176 views Asked by At

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:

Unable to send request to mywebsite.com.

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>

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'
1

There are 1 answers

0
Franco On

Along with requesting to be whitelisted for your email for Gmail actions, you have to request to be whitelisted for Bearer Tokens as well.