We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am creating a messenger chatbot and I get the following error.
_> File "/app/app.py", line 87, in webhook
response = client.message(msg=text, context={'session_id':fb_id}) File "/app/.heroku/python/lib/python3.9/site-packages/wit/wit.py", line 69, in message resp = req(self.logger, self.access_token, 'GET', '/message', params) File "/app/.heroku/python/lib/python3.9/site-packages/wit/wit.py", line 41, in req raise WitError('Wit responded with status: ' + str(rsp.status_code) + wit.wit.WitError: Wit responded with status: 400 (Bad Request)_
response = client.message(msg=text, context={'session_id':fb_id})
File "/app/.heroku/python/lib/python3.9/site-packages/wit/wit.py", line 69, in message resp = req(self.logger, self.access_token, 'GET', '/message', params)
File "/app/.heroku/python/lib/python3.9/site-packages/wit/wit.py", line 41, in req raise WitError('Wit responded with status: ' + str(rsp.status_code) + wit.wit.WitError: Wit responded with status: 400 (Bad Request)_
I know this is a client error and was raised before however I still cannot resolve it. I am using Server Access Token to create my client.
Also this error is triggered as soon as I enter the webhook.
This is what my webhook looks like:
@app.route('/', methods=['POST']) def webhook(): messaging_text = None data = request.json log(data) if data['object'] == 'page': for entry in data['entry']: messages = entry['messaging'] if messages[0]: message = messages[0] fb_id = message['sender']['id'] text = message['message']['text'] response = client.message(msg=text, context={'session_id':fb_id}) handle_message(response=response, fb_id=fb_id)
Kindly help.
The text was updated successfully, but these errors were encountered:
@harshitmehta , I will take a look
Sorry, something went wrong.
@harshitmehta, what is the app ID? Have you tried to send the request as a plain HTTP message?
No branches or pull requests
I am creating a messenger chatbot and I get the following error.
_> File "/app/app.py", line 87, in webhook
I know this is a client error and was raised before however I still cannot resolve it.
I am using Server Access Token to create my client.
Also this error is triggered as soon as I enter the webhook.
This is what my webhook looks like:
Kindly help.
The text was updated successfully, but these errors were encountered: