on-internet
← Community

Failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request - OAuth 2.0 POST

Stack Overflow ·

I am working with YouTube APIs for my college project, and I keep getting an error. Here I send them to the authorisation page to log in, when they allow access it sends the $_GET['code'] string back. Then I send this along with some other data and it should send back a JSON object. Instead I am just getting Warning: file_get_contents(https://accounts.google.com/o/oauth2/token) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request in http://www.example.net/callback.php on line 27 I have replaced my domain with example.net just for security urlencode

Comments

Sign in or sign up to comment and upvote.

No comments yet.