Error Authenticating to LastFM "Must not send passwords in query string"

131 views Asked by At

Ok, so I have been fighting this one for a bit. I am trying to Authenticate to LastFM from an Android App.

This page describes my basic plan of attack: http://www.last.fm/api/mobileauth

sig = "api_key" + getString(R.string.lastfm_key) + "methodauth.getMobileSessionpassword" + pass + "username" + username +getString(R.string.last_api_secret);
String api_sig_md5 = md5(sig);

HttpPost hp_auth = new HttpPost("https://ws.audioscrobbler.com/2.0/"
 + "?method=auth.getMobileSession"
 + "&username=" + username 
 + "&password=" + pass
 + "&api_key=" 
 + getString(R.string.lastfm_key)
 + "&api_sig=" + api_sig_md5);

The response I get is:

You must not send passwords in the query string when using this Method. Message details should be in the Post body only.

I thought I did a pretty good job of following the documentation, but I'm stuck on this one.

Thanks in advance

0

There are 0 answers