Skip to content

邮箱

查询邮箱。

const TOKEN = '123456';

const url = 'https://api.github.com/user/emails';
const options = { method: 'GET', headers: { Authorization: 'Bearer ' + TOKEN } };

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}

联系 math@baima.site