nateyolles / slack-pokerbot

Agile Scrum poker planning bot for Slack
Apache License 2.0
17 stars 13 forks source link

integration mapping in API Gateway #1

Closed danhanley closed 7 years ago

danhanley commented 7 years ago

I'm getting the follow response in Slack from the Lambda function:

PokerBot BOT [5:15 PM] Only visible to you {"message": "Could not parse request body into json: Unrecognized token \'token\': was expecting \'null\', \'true\', \'false\' or NaN\n at [Source: [B@238685e5; line: 1, column: 7]"}

My guess is tat I have not configured the Integration Maping in the API Gateway correctly (in fact, I've left it on it's defaults).

Should I be putting a mapping template in here?

Cheers

Dan

danhanley commented 7 years ago

As suspected I needed an integration mapping of:

{ "body" : $input.json('$') }

for application/x-www-form-urlencoded data.

nateyolles commented 7 years ago

Thank you for posting your findings.