particle-iot / cloud

A place to discuss issues, enhancements, features for: API, Cloud Compiler, Web IDE (Build), Webhooks, Console, and Device Setup
2 stars 0 forks source link

period in form field name for webhooks #2

Open brycekahle opened 8 years ago

brycekahle commented 8 years ago

From @pommerien on February 3, 2016 8:54

I am experiencing a minor issue with posting to Google forms from a webhook. It appears as if the particle cloud does not like form field names to contain periods. For example:

{
    "eventName": "temperature",
    "url": "https://docs.google.com/forms/d/someformid/formResponse",
    "requestType": "POST",
    "form": {
        "entry.1083994980" : "200"
    },
    "mydevices": true
}

Results in:

Using settings from the file google-sheet.json
Sending webhook request  { uri: '/v1/webhooks',
  method: 'POST',
  json: 
   { event: 'temperature',
     url: 'https://docs.google.com/forms/d/someformid/formResponse',
     deviceid: undefined,
     requestType: 'POST',
     mydevices: true,
     eventName: 'temperature',
     form: { 'entry.1083994980': '200' } },
  headers: { Authorization: 'Bearer 491e074f48c6589ca7a477b62a71d3922430a06c' } }
Error {}

Note the empty error hash being sent back. However this JSON creates a webhook just fine:

{
    "eventName": "temperature",
    "url": "https://docs.google.com/forms/d/someformid/formResponse",
    "requestType": "POST",
    "form": {
        "entry1083994980" : "200"
    },
    "mydevices": true
}

Copied from original issue: spark/particle-cli#203

brycekahle commented 8 years ago

Thanks for the bug report. I will take a look and get back to you.

brycekahle commented 8 years ago

Confirmed. I've filed a bug on our API internally. I will update this issue when any changes are made.

brycekahle commented 8 years ago

From @johnwelford on March 22, 2016 22:59

Any progress on this, or any possible workarounds?

dmiddlecamp commented 8 years ago

Thanks for the bug report! I'll look into this as soon as I get a chance.

Sent from my iPhone

On Mar 22, 2016, at 7:33 PM, Bryce Kahle notifications@github.com wrote:

Assigned #2 to @dmiddlecamp.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub

johnwelford commented 8 years ago

Any progress on this, is it a significant change that is required?

brycekahle commented 8 years ago

It is a tricky change but we haven't forgotten about it!

johnwelford commented 8 years ago

Still no progress on this? Unfortunately I have a whole project waiting on this bug to be fixed...