Webhook suddenly not validated

webhooks

#1

I had a direct message twitter webhook set up and it was working perfectly. I’ve just recently checked it and twitter has now made it invalid. I tried sending a PUT request to update it, but it kept saying the latency was too high - but I know that it responds under 1 second! Especially as it was validated before!
I then tried to delete and re-register the webhook but it now won’t let me.
Can anyone help with what might have changed?


#2

When you say “it now won’t let me”, what error are you seeing?


#3

@andypiper Hi, I’m getting “High latency on CRC GET request. Your webhook should respond in less than 1 second.” Though when I test with curl, my response time is always under 1 second


#4

@andypiper Hi, any ideas on this?


#5

Are you returning a 200?


#6

@bobber205 Yep


#7

I think you need to post some code before anyone can offer more help.


#8

@bobber205
This is my code for the GET request on my webhook - python

        crc = request.args['crc_token']
        crc = str(crc)
        validation = hmac.new(
            key=consumer_secret,
            msg=crc,
            digestmod = hashlib.sha256
        )

        signature = base64.b64encode(validation.digest())

        data = {"response_token": "sha256=" + signature}

        return jsonify(data)

#9

One quick note here - we recently extended the timeout requirements for a CRC check to 3 seconds (instead of 1 second). We are getting the docs and error messages updated, but hopefully this helps if that was the problem.


#10

@KyleW

Hey, when did you extend this? I’m not sure I see how this would cause an issue. I’m getting a latency error but I’m sure my webhook replies quicker than 1 second, so definitely quicker than 3!


#11

@fayebutler Are you tunneling through anything?


#12

@bobber205 sorry, what do you mean by that? I don’t think so


#13

What’s the URL you are telling twitter to connect to?


#14

@bobber205 this one:

https://faye.thinkjam.com/webhook


#15

That isn’t accessible…