-
Thanks for great API! $response = $client->tweet()->create()->performRequest(['text' => 'Testing API V2 ']); |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The variable $response is always an HTTP 200 response. Indeed, in case of an error, the API will return an Exception containing the error message and the relevant HTTP code. |
Beta Was this translation helpful? Give feedback.
The variable $response is always an HTTP 200 response. Indeed, in case of an error, the API will return an Exception containing the error message and the relevant HTTP code.
You can see this process here: https://github.com/noweh/twitter-api-v2-php/blob/master/src/AbstractController.php in the function performRequest.