title: Google OAuth 2.0 invalid_client Unauthorized
body: <p>I used this code to authorize Google+ via OAuth 2.0</p>
  
  <blockquote>
    <p>oauthswift = OAuth2Swift(
                    consumerKey:    "984813079630-f828a92sqtl5lgumd4kgp9i30bs9og09.apps.googleusercontent.com",
                    consumerSecret: "AIzaSyD13MBv78yWIjl4TX9jOOT9AWuEkYdVSPQ",
                    authorizeUrl:   "<a href="https://accounts.google.com/o/oauth2/v2/auth" rel="nofollow noreferrer">https://accounts.google.com/o/oauth2/v2/auth</a>",
                    accessTokenUrl: "<a href="https://www.googleapis.com/oauth2/v4/token" rel="nofollow noreferrer">https://www.googleapis.com/oauth2/v4/token</a>",
                    responseType:   "code"
            )</p>
  
  <pre><code>    let handle = oauthswift.authorize(
              withCallbackURL: URL(string: "com.googleusercontent.apps.984813079630-f828a92sqtl5lgumd4kgp9i30bs9og09:/oauth")!,
              scope: "profile", state:"GOOGLE",
              success: { credential, response, parameters in
                  print(credential.oauthToken)
                  // Do your request
              },
              failure: { error in
                  print(error.localizedDescription)
                  print((error as OAuthSwiftError).errorUserInfo)
              }
      )
  </code></pre>
  </blockquote>
  
  <p>but the result always failed</p>
  
  <blockquote>
    <p>The operation couldn’t be completed. (OAuthSwiftError error -11.)
    ["request": <a href="https://www.googleapis.com/oauth2/v4/token" rel="nofollow noreferrer">https://www.googleapis.com/oauth2/v4/token</a>, "error": Error
    Domain=NSURLErrorDomain Code=401 "invalid_client Unauthorized"
    UserInfo={Response-Body={  "error": "invalid_client", 
    "error_description": "Unauthorized" } ,
    NSErrorFailingURLKey=<a href="https://www.googleapis.com/oauth2/v4/token" rel="nofollow noreferrer">https://www.googleapis.com/oauth2/v4/token</a>,
    Response-Headers={
        "Cache-Control" = "private, max-age=0";
        "Content-Encoding" = gzip;
        "Content-Length" = 81;
        "Content-Type" = "application/json; charset=UTF-8";
        Date = "Thu, 15 Jun 2017 04:25:10 GMT";
        Expires = "Thu, 15 Jun 2017 04:25:10 GMT";
        Server = GSE;
        Vary = "Origin, X-Origin";
        "Www-Authenticate" = "Bearer realm=\"<a href="https://accounts.google.com/" rel="nofollow noreferrer">https://accounts.google.com/</a>\"";
        "alt-svc" = "quic=\":443\"; ma=2592000; v=\"38,37,36,35\"";
        "x-content-type-options" = nosniff;
        "x-frame-options" = SAMEORIGIN;
        "x-xss-protection" = "1; mode=block"; }, OAuthSwiftError.response= { URL:
    <a href="https://www.googleapis.com/oauth2/v4/token" rel="nofollow noreferrer">https://www.googleapis.com/oauth2/v4/token</a> } { status code: 401,
    headers {
        "Cache-Control" = "private, max-age=0";
        "Content-Encoding" = gzip;
        "Content-Length" = 81;
        "Content-Type" = "application/json; charset=UTF-8";
        Date = "Thu, 15 Jun 2017 04:25:10 GMT";
        Expires = "Thu, 15 Jun 2017 04:25:10 GMT";
        Server = GSE;
        Vary = "Origin, X-Origin";
        "Www-Authenticate" = "Bearer realm=\"<a href="https://accounts.google.com/" rel="nofollow noreferrer">https://accounts.google.com/</a>\"";
        "alt-svc" = "quic=\":443\"; ma=2592000; v=\"38,37,36,35\"";
        "x-content-type-options" = nosniff;
        "x-frame-options" = SAMEORIGIN;
        "x-xss-protection" = "1; mode=block"; } }, OAuthSwiftError.response.data=&lt;7b0a2022 6572726f 72223a20 22696e76
    616c6964 5f636c69 656e7422 2c0a2022 6572726f 725f6465 73637269
    7074696f 6e223a20 22556e61 7574686f 72697a65 64220a7d 0a>,
    NSLocalizedDescription=invalid_client Unauthorized}]</p>
  </blockquote>
  
  <p>Could you please correct it ?</p>