Omar Heaba
Omar Heaba

Reputation: 193

how can I upload backup of SQLite db to the google drive, and restore it?

I am new to using Google Drive API, I tried some samples but it didn't work well like this:

https://github.com/stevenchang0529/XamarinGoogleDriveRest

It works fine, but when I try to sign in, I get this error:

Error 400: "redirect_uri_mismatch"

Upvotes: 0

Views: 364

Answers (1)

nevermore
nevermore

Reputation: 15816

Error 400: "redirect_uri_mismatch" means the callback url in the setup of the OAuth of Google end is incorrect.

In that sample project, there are two keys in the MainViewModel:

  private string clientId = "put your client Id from goole api console";
  private string redirectUrl = "xamarin.test.driverest:/oauth2redirect";

You need to console.cloud.google to get the correct redirectUrl.

There are also steps in the read.me of the Github project:

1.On Google API Console,Add Google Drive API
2.Add OAuth2.0 Credential for Android.
3.change client id in MainViewModel.cs.

Upvotes: 1

Related Questions