line replyToken invalid
yipcma opened this issue · 7 comments
{ headers:
{ server: 'nginx',
'content-type': 'application/json;charset=UTF-8',
'x-line-request-id': '784ef36e-e864-4884-a8b5-fc883e7142fd',
'x-content-type-options': 'nosniff',
'x-xss-protection': '1; mode=block',
'x-frame-options': 'DENY',
'content-length': '94',
expires: 'Mon, 13 Feb 2017 09:46:47 GMT',
'cache-control': 'max-age=0, no-cache, no-store',
pragma: 'no-cache',
date: 'Mon, 13 Feb 2017 09:46:47 GMT',
connection: 'close' },
body: '{"message":"The property, \'replyToken\', in the request body is invalid (line: 1, column: 15)"}',
statusCode: 400,
statusMessage: 'Bad Request' }
Would love to follow up on line basic integration @simalexan
@yipcma can you send PR for this?
@stojanovic I don't have any clue, been reading line docs but it's not helping.
I'm going to need to do some Line integration in the coming week/s, will update this ticket in case I find any issues.
this could be the issue with the encoding:
Signature validation
The signature in the X-Line-Signature request header must be verified to confirm that the request was sent from the LINE Platform.
Authentication is performed as follows.
With the Channel secret as the secret key, your application retrieves the digest value in the request body created using the HMAC-SHA256 algorithm.
The server confirms that the signature in the request header matches the digest value which is Base64 encoded.
@yipcma I wrote to their support. It's not a signature issue, because signature is just a validation that message is received from Line, we don't need to send anything for that.
Finally!
It was a content length header!
Commit: 4596259