阅读(3495) (13)

Laravel 8 POST /oauth/personal-access-tokens

2021-07-09 12:59:44 更新

此路由用于创建新的个人访问令牌。它需要两个数据:令牌的 namescopes

const data = {
    name: 'Token Name',
    scopes: []
};

axios.post('/oauth/personal-access-tokens', data)
    .then(response => {
        console.log(response.data.accessToken);
    })
    .catch (response => {
        // List errors on response...
    });