Request token github

0

I am trying to make a request with fetch api in javascript to request token, however I have received the following error:

{
"message": "Requires authentication",
"documentation_url": "https://developer.github.com/v3"
}

With the following command curl everything happens perfectly:

curl -i --user "FranciscoSalesCarvalho:999999999" -d '{"scopes": ["repo", "user"], "note":"teste2"}' https://api.github.com/authorizations

Could anyone help me?

    
asked by anonymous 15.04.2018 / 17:02

0 answers