JavaScript
2
Вклад в тег
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)});