-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
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
400 Bad request #2
Comments
What version the library you are using? |
@christophrumpel I checked your code, it works. |
0.2.2, ah ok then I will try 0.2.3 👍 thx |
@christophrumpel I am glad to help you, thank you for the use of the library. |
Thx, I am really glad you created it! |
Interesting, I got the same problem with another project where I use your package version 0.2.5. try {
$client = new Client($this->accessToken);
$query = $client->get('query', [
'query' => $message,
'sessionId' => time()
]);
$response = json_decode((string)$query->getBody(), true);
dd($response);
} catch (\Exception $error) {
dd($error);
} |
Christoph, how am I to resolve this issue? Im getting 400 error. What is the $this variable? My composer shows iboldurev/api-ai-php 0.2.5 API.ai php sdk |
How should my code look? |
Hey @bottomoftheheap9000 , in my example Have your tried to add a |
Hi! Thanks for responding! I've altered my code as advised, the page now loads (so it must be connecting to the api!), however Im not able to display the json response. Im not sure if Im receiving anything from api.ai, I have tried echo $response; But it just comes up blank.. How am I supposed to know if api.ai is responding and how would I display the response, thanks again @christophrumpel !! |
Try |
Hey @iboldurev ,
today it started given me this error:
When I try to query a simple message like:
I checked the apiai token and my code and I'm not sure why I get this error. Can you help me?
Thx Christoph
The text was updated successfully, but these errors were encountered: