Using vb.net to connect to quickfile api, I’m getting a constant invalid login credentials error.
I’ve checked the md5 hash its generating along with ensuring the sequence number is incrementing. I’ve checked the permissions for my app through the QF interface 3rd party area, in fact I added all permissions just in case. Just doing a client_search at the moment, but getting the error with client_get as well.
Here’s some VB.NET code you can use to MD5 encrypt the string:
'MD5 ENCRYPT STRING
Function md5Encrypt(ByVal input As String) As String
Dim md5 As New Encryption.Hash(Encryption.Hash.Provider.MD5)
Dim encData As New Encryption.Data
encData.Text = input
Dim hashData As Encryption.Data = md5.Calculate(encData)
Dim encryptedResponse As String = hashData.ToHex.ToLower
Return encryptedResponse
End Function
Also check the case on the API key, I don’t know if it makes a difference but in our test cases it goes in as upper case.
thanks for the quick replies. I have copied the keys literally off of the QF page so I didn’t mistype anything. I’ll try your code Glenn, though I have been checking the one mine produces with the MD5 tool site suggested. i’ll let you know if it still persists.
i’ve rechecked all the keys and ID. and the md5 hash is coming out the same as md5tools. But the key being sent as upper case doesn’t make a difference for me it seems.
Also @Glenn what library should I import as your code doesn’t seem to like System.Security.Policy that the error help wanted to append to the module.
thanks @Glenn for the file. Your code gives the same result as the one I’m using. BUT… neither gives the same md5 value as what the sandbox area gives, yet plug the stringtohash into allhypes tool and they give me the same result as me, not the sandbox.
Now I am even further confused… as still getting invalid login. Yet using the sandbox md5 value I get through the login
In the sandbox if I concatenate the following (in the order specified) and manually run it through the allhype.co.uk MD5 tool it produces the same output as the <MD5Value> in the preloaded example request.
In my example I only have one application called aaaaa.
If you change any of the fields you can reload it by clicking here:
thanks @Glenn, I can see where I was doing it wrong. I used the app key in the hash, instead of the API key… something like that. Much appreciate everyone taking their time to help.