Skip to content
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` response #6

Open
kaushikdas0 opened this issue Nov 30, 2016 · 4 comments
Open

400 Bad Request` response #6

kaushikdas0 opened this issue Nov 30, 2016 · 4 comments

Comments

@kaushikdas0
Copy link

kaushikdas0 commented Nov 30, 2016

Hello Guys,
I just tried out the PHP SDK, used composer to install and when i try to use the first sample code which is

require_once __DIR__.'/vendor/autoload.php';

use ApiAi\Client;

try {
    $client = new Client('MY_CLIENT_ACCESS_TOKEN');

    $query = $client->get('query', [
        'query' => 'Hello',
    ]);

    $response = json_decode((string) $query->getBody(), true);
} catch (\Exception $error) {
    echo $error->getMessage();
}

i am getting the following error:

Client error: GET https://api.api.ai/v1/query?v=20150910&lang=en&query=Hello` resulted in a 400 Bad Request response: { "id": "abb5553d-69d6-41ba-bfba-cadc777536a8", "timestamp": "2016-11-30T09:29:32.553Z", "status": { "code": 4 (truncated...)`

Did the signature change/sdk needs to be updated because using POSTMAN i am able to query perfectly fine.

@iamkenken
Copy link

I got the same problem. hope you can help us. thanks

@salim523
Copy link

salim523 commented Dec 3, 2016

I have same problem with 1st sample but I try 2nd one and it worked.

@iboldurev
Copy link
Owner

Hi, currently I am planning to write a new client for the platform

@rebornishard
Copy link

@ibodurev thanks to hearing us

Repository owner locked and limited conversation to collaborators Dec 9, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants