rlamasb / Firebase.Xamarin

Light weight wrapper for Firebase Realtime Database REST API.
MIT License
149 stars 39 forks source link

"Response status code does not indicate success: 400 (Bad Request)." #32

Closed flyinb closed 7 years ago

flyinb commented 7 years ago

i am able to get a token, but I am getting a generic 400 error with the following code:

var authProvider =
                    new FirebaseAuthProvider(new FirebaseConfig("--My API Key--"));
                var auth = await authProvider.SignInWithEmailAndPasswordAsync(username, password);

                var firebase = new FirebaseClient("https://mydbname.firebaseio.com/");
                var user = new LocalUser();
              var xx = await firebase.Child("Users").Child(username).WithAuth(auth.FirebaseToken).PostAsync(user,false).ConfigureAwait(true);

and the LocalUser is defined as:

public class LocalUser
    {       
        public string SomeData = "MoarData";
    }
flyinb commented 7 years ago

i think i sorted it. Doesn't like "." or "@" symbols in the key.

flyinb commented 7 years ago

Would be nice to see the inner exception? OR a detailed message?