n.oskian-indice
-
5/14/2013 6:00:58 AM
Hash authentication in REST request
Hello,
I am having trouble with the hash authentication in the rest service request. I make an ajax call like this
var params = { 'format': 'json', 'where': 'LocationZipCode=' + code }; $j.ajax({ type: 'GET', url: '/rest/customtableitem.customtable.Location/all', dataType: 'json', data: params, username: 'xxxx', password: 'xxxx', error: function (xhr, ajaxOptions, thrownError) { alert(thrownError); }, success: function (response) { //some code here } });
and it's working. Then I generate the hash in the site manager for the given url, remove the username & password from the ajax call and I add the hash parameter like this: var params = { 'format': 'json', 'where': 'LocationZipCode=' + code, 'hash': 'I_write_the_hash_code_here' }; and it requires authentication. Should i do something different?
Thank you in advance, Natalie Oskian
|