Home  >  Q&A  >  body text

python - 微信公众号接入url验证返回"ret":-302,"err_msg":"verify token fail"

下图是我用python进行的验证,测试显示已经返回echostr了,但是微信那边一直显示token验证失败,求指导~~
返回的错误是{"baseresp":{"ret":-302,"errmsg":"verify token fail"}}
但是我的token设置和代码里是一样的,已经确认了

伊谢尔伦伊谢尔伦2741 days ago1733

reply all(3)I'll reply

  • 阿神

    阿神2017-04-17 16:19:05

    Reply cannot use 'return' directly, but needs to call make_response

    reply
    0
  • 阿神

    阿神2017-04-17 16:19:05

    I also encountered this problem recently. In fact, the server did not receive the WeChat request at all. After struggling for a long time, it turns out that the server path of the WeChat official account only supports second-level domain names, such as xxx.xxx.com, xxx.xxx.xxx. com will throw -302 error

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 16:19:05

    Have you solved it? How to solve it? I reported this error, I wonder if it is the same as yours {"base_resp":{"ret":200302,"err_msg":"verify token fail"}}

    reply
    0
  • Cancelreply