Quickblox API Session Creation With User & Signature Error -


quickblox rest api create session function running without user information not working when added user information.

signature string:success

 string signaturestr=string.format("application_id={0}&auth_key={1}&nonce={2}&timestamp={3}", this.application_id, this.auth_key, this.nonce, this.timestamp); 

signature string:error

string signaturestr=string.format("application_id={0}&auth_key={1}&nonce={2}&timestamp={3}&user[login]={4}&user[password]={5}", this.application_id, this.auth_key, this.nonce, this.timestamp,this.user.login,this.user.password); 

generate signature function

  public string generatehmacsha1(string key, string body)     {         system.text.encoding encoding = system.text.encoding.utf8;         byte[] keybyte = encoding.getbytes(key);          hmacsha1 hmacsha1 = new hmacsha1(keybyte);         byte[] messagebytes = encoding.getbytes(body);         byte[] hashmessage = hmacsha1.computehash(messagebytes);         return bytetostring(hashmessage);     } 

error information

statuscode => 422 unprocessable entity

error message=> unexpected signature

why work?


Comments

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -