Answer the question
In order to leave comments, you need to log in
How to properly use the github.com API?
How to properly use the github.com API?
I'm trying to get information on the token using a request to the API described at the link
https://developer.github.com/v3/oauth_authorizatio...
I'm making
such a request in the address bar of the browser
https://api.github.com/applications/{Client ID}/tokens/{access_token}
{
"message": "Not Found",
"documentation_url": "https://developer.github.com/v3"
}
Answer the question
In order to leave comments, you need to log in
This is how the query worked
let userpass = btoa(`${clientId}:${clientSecret}`);
let url_2 = `https://api.github.com/applications/${clientId}/tokens/${x.access_token}`;
fetch(url_2, {
method: 'GET',
headers: {
'Authorization': `Basic ${userpass}`
}
} )
.then(x => x.json())
.then(x => {console.log(x)});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question