Closed skywinder closed 1 year ago
let config = TokenConfiguration(GITHUB_TOKEN) let gh = Octokit(config) gh.repository(owner: owner, name: name) { response in switch response { case .success(let repository): stars = repository.stargazersCount if let unwrapped = stars { print("\(name) : \(unwrapped)⭐️") } break case .failure(let error): print(error) break }
this code works fine without token (but with token gets error:
Error Domain=com.nerdishbynature.octokit Code=401 "(null)" UserInfo={RequestKitErrorKey={ "documentation_url" = "https://developer.github.com/v3"; message = "Bad credentials"; }}
I tried to send the same token by curl - everything works fine.
Which scopes does your token have?
I just tried it and it works like it should.
Closing because of no activity for almost 2 years.
this code works fine without token (but with token gets error:
I tried to send the same token by curl - everything works fine.