GithubAPI icon indicating copy to clipboard operation
GithubAPI copied to clipboard

.get(owner: owner, repo: name.. returns nil values because of bad parsing (actually it's 401_)

Open skywinder opened this issue 6 years ago • 1 comments

 let authentication = AccessTokenAuthentication(access_token: GITHUB_TOKEN)
            let ghapi = RepositoriesAPI(authentication: authentication)
            ghapi.get(owner: owner, repo: name, completion:
                { (response, error) in
                if response != nil {
                    print(response!)
                } else {
                    print(error ?? "empty response")
                }
            })

returns repo with all nil's.

Actually session returns 401 with description:

Optional<String>
  - some : "{\"message\":\"Bad credentials\",\"documentation_url\":\"https://developer.github.com/v3\"}"

Can't realize, how to do authentification the right way

skywinder avatar Jan 07 '20 02:01 skywinder

https://github.com/serhii-londar/GithubAPI/issues/12#issue-546045434

nancy728 avatar Nov 14 '22 15:11 nancy728