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

  1. using ci , routing purpose.
  2. added following header in host, content-type, ifttt-channel-key, accept-encoding
  3. 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 correct ifttt-channel-key sent in headers
  • with invalid channel key checked when return status code 401 when incorrect ifttt-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 :

enter image description here

service api key unique per channel


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -