You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 28, 2022. It is now read-only.
I'm trying to use the api, but with this basic code :
require_once dirname(__FILE__) . '/github-api3-php/lib/vendor/Symfony/Component/ClassLoader/UniversalClassLoader.php';
$loader = new Symfony\Component\ClassLoader\UniversalClassLoader();
// Register the location of the GitHub namespace
$loader->registerNamespaces(array(
'Buzz' => __DIR__.'/github-api3-php/lib/vendor/Buzz/lib',
'GitHub' => __DIR__.'/github-api3-php/lib'
));
$loader->register();
use GitHub\API\Authentication;
use GitHub\API\User\User;
use GitHub\API\AuthenticationException;
use GitHub\API\User\User;
// Setup the user, and authenticate (using basic HTTP auth)
$user = new User();
$user->setCredentials(new Authentication\Basic('quoidautre', 'MY_PASSWORD'));
$user->login();
// Get the user details
$response = $user->get();
var_dump($response);
I've this error :
object(Buzz\Message\Response)[8]
protected 'headers' =>
array (size=4)
0 => string 'HTTP/1.0 403 Forbidden' (length=22)
1 => string 'Cache-Control: no-cache' (length=23)
2 => string 'Connection: close' (length=17)
3 => string 'Content-Type: text/html' (length=23)
protected 'content' => string 'Request forbidden by administrative rules. Please make sure your request has a User-Agent header (http://developer.github.com/v3/#user-agent-required). Check https://developer.github.com for other possible causes.' (length=213)
Any idea ?, can anybody helps me ?
Thanks.
Fabrice
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi there,
I'm trying to use the api, but with this basic code :
I've this error :
Any idea ?, can anybody helps me ?
Thanks.
Fabrice
The text was updated successfully, but these errors were encountered: