Skip to content

Instantly share code, notes, and snippets.

@CollectiveHealth-gists
Created September 7, 2017 18:25
Show Gist options
  • Save CollectiveHealth-gists/bef532394ad714f4567902d7b443a0b5 to your computer and use it in GitHub Desktop.
Save CollectiveHealth-gists/bef532394ad714f4567902d7b443a0b5 to your computer and use it in GitHub Desktop.
Example Lambda proxied request data
{
u 'body': u 'token=SLASH_CMD_TOKEN&team_id=T1PASUPJL&team_domain=my_slack_domain&channel_id=C3GQWN08L&channel_name=integration_dev&user_id=U3GMSMREW&user_name=jdev&command=%2Fs1&text=health&response_url=https%3A%2F%2Fhooks.slack.com%2Fcommands%2FXXXXXXXXX%2FXXXXXXXXXXXX%2FXXXXXXXXXXXXXXX', u 'resource': u '/slack/cmds/s1', u 'requestContext': {
u 'resourceId': u '7y5pmu',
u 'apiId': u 'REDACTED',
u 'resourcePath': u '/slack/cmds/s1',
u 'httpMethod': u 'POST',
u 'requestId': u '08b60825-d7ad-11e6-8e0c-2d47855f377e',
u 'accountId': u 'REDACTED',
u 'identity': {
u 'apiKey': REDACTED,
u 'userArn': REDACTED,
u 'cognitoAuthenticationType': None,
u 'accessKey': None,
u 'caller': REDACTED,
u 'userAgent': u 'Slackbot 1.0 (+https://api.slack.com/robots)',
u 'user': REDACTED,
u 'cognitoIdentityPoolId': None,
u 'cognitoIdentityId': None,
u 'cognitoAuthenticationProvider': None,
u 'sourceIp': u '52.X.X.X',
u 'accountId': REDACTED
},
u 'stage': u 'dev'
}, u 'queryStringParameters': None, u 'httpMethod': u 'POST', u 'pathParameters': None, u 'headers': {
u 'Content-Type': u 'application/x-www-form-urlencoded',
u 'Via': u '1.1 1dfcd1bafe1d21759a09fdcad1a93705.cloudfront.net (CloudFront)',
u 'Accept-Encoding': u 'gzip,deflate',
u 'CloudFront-Is-SmartTV-Viewer': u 'false',
u 'CloudFront-Forwarded-Proto': u 'https',
u 'X-Forwarded-For': u '52.X.X.X, 54.X.X.X',
u 'CloudFront-Viewer-Country': u 'US',
u 'Accept': u 'application/json,*/*',
u 'User-Agent': u 'Slackbot 1.0 (+https://api.slack.com/robots)',
u 'Host': u 'xxxxxxxx.execute-api.us-west-2.amazonaws.com',
u 'X-Forwarded-Proto': u 'https',
u 'X-Amz-Cf-Id': u 'p-R0SJYmkrD3DqdGMQnPZhUafV50dxKgCRJJoYqeYPSU_FQNcFpFpg==',
u 'CloudFront-Is-Tablet-Viewer': u 'false',
u 'X-Forwarded-Port': u '443',
u 'CloudFront-Is-Mobile-Viewer': u 'false',
u 'CloudFront-Is-Desktop-Viewer': u 'true'
}, u 'stageVariables': None, u 'path': u '/slack/cmds/s1', u 'isBase64Encoded': False
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment