php - IFTTT Status check URL and Key -
i trying implement ifttt in website. have created service. have created api status , test setup check given type, like
api-> abc.com/api/ifttt/v1/status & abc.com/api/ifttt/v1/test/setup
- using ci , routing purpose.
- added following header in host, content-type, ifttt-channel-key, accept-encoding
- channel key taken when creating applet remember. @ end of url
but in response getting following error status check when doing endpoint test - valid request in green. - invalid channel key in red status code 401 shown
please me out. thanks,
for status/setup endpoint test :
valid request
checked when return status code 200 when correctifttt-channel-key
sent in headerswith invalid channel key
checked when return status code 401 when incorrectifttt-channel-key
sent in headers
for instance request invalid channel key :
request :
get https://example.com/api/ifttt/v1/status http/1.1 accept: application/json accept-charset: utf-8 accept-encoding: gzip, deflate user-agent: ifttt-protocol/v1 ifttt-test-mode: 1 ifttt-channel-key: invalid
response:
http/1.1 401 unauthorized date: fri, 07 apr 2017 23:04:28 gmt server: apache/2.4.10 (debian) content-type: application/json vary: accept-encoding content-length: 0 connection: close
you have check ifttt-channel-key
header value , send status code 200 if it's correct & 401 if incorrect.
ifttt-channel-key
service api key can find under api
/general
tab :
service api key unique per channel
Comments
Post a Comment