Hallo Leute, ich habe meine Haare für dieses Problem gezogen. Ich greife auf eine API von Ryver zu, um Post-Chat-Nachrichten für automatische Benachrichtigung zu senden. Ich folge diesen doc https://support.ryver.com/chatmessage-api/ und ich bin mit Laravel 5.1 mit Guzzle und mein Code hier ist, wenn esGuzzle api
$client = new Client();
$postData = \GuzzleHttp\json_encode(['JSON Payload' => ['body' => 'test123']]);
$options = [
'json' => $postData
];
$request = $client->post('https://somecompany.ryver.com/api/1/odata.svc/workrooms(1099207)/Chat.PostMessage()', $options);
$request->setHeader('Content-Type', 'application/json');
$request->setHeader('Accept', 'application/json');
$request->setHeader('Authorization', 'Basic Base64codehere');
$response = $request->send();
hilft Es gibt immer einen [Statuscode] 400, Bitte helfen :(Danke und haben eine große Tag!
Was hat der Antworttext? –
Ich kann keine Antwort @JonStirling senden, weil es eine Ausnahme auslöst. Clientfehlerantwort [Statuscode] 400 [Grundphrase] Ungültige Anforderung –