diff --git a/src/Core/Error/ApiException.php b/src/Core/Error/ApiException.php
index <HASH>..<HASH> 100644
--- a/src/Core/Error/ApiException.php
+++ b/src/Core/Error/ApiException.php
@@ -72,7 +72,9 @@ class ApiException extends Exception
                 }
                 return new ErrorResponseException($message, $request, $response, $previous);
             case 401:
-                if (strpos((string)$response->getBody(), 'invalid_token') !== false) {
+                $body = $response->getBody()->getContents();
+                $response = $response->withBody(stream_for($body));
+                if (strpos($body, 'invalid_token') !== false) {
                     return new InvalidTokenException($message, $request, $response, $previous);
                 }
                 return new InvalidClientCredentialsException($message, $request, $response, $previous);
WIP: restore response body stream for invalid token error