I’m trying to connect to the ACS from an application made in C#, first I tried to login but I couldn’t connect, instead I got this error message: The remote server returned an error: (406) Not Acceptable. This is my code:
private void btnLogin_Click(object sender, EventArgs e)
{
String url = "https://api.cloud.appcelerator.com/v1/users/login.json?key=esfob3KF1R2zBRh8vroMQCCMlQCP44xx&login=prueba123@mail.com&password=" + txtClave.Text;
WebRequest wrGetUrl = WebRequest.Create(url);
Stream objStream = wrGetUrl.GetResponse().GetResponseStream(); //I get the error in this line
StreamReader reader = new StreamReader(objStream);
String line = reader.ReadToEnd();
MessageBox.Show(line);
}
I can make queries but for those I don’t require to login, in the application I’m working I also have to create Photos and Custom Objects. Can somebody help me in this one?
According to the documentation, you need to use
POSTmethod for that call: