$ curl -u 'username' -d '{ "scopes": ["repo"], "note": "Command-line access" }'
https://api.github.com/authorizations
Enter host password for user 'username': [type password]
{
"scopes": [
"repo"
],
"token": "your_token",
"app": {
"url": "http://developer.github.com/v3/oauth/#oauth-authorizations-api",
"name": "Command-line access (API)"
},
"url": "https://api.github.com/authorizations/123456",
"note": "Command-line access",
"note_url": null,
"id": 123456,
}