api key - Use API keys using AJAX -
i'm trying user's api key database perform uri calls.
at moment i'm doing in unsecure way running following ajax request:
$.ajax({ type: 'get', async: false, url: 'http://localhost:8080/giftregistryapi/api/v1/key/apikey/' + paramhostid, success: function(result) { var key = result.key; returnapikey(key); } });
the api key stored in global variable used methods require it. need is
- securely user's (host) api key
- use api key methods require it?
how do this?
you can make php script store api key. call script ajax call. script call api url directly , return data requested.
or can pass key ajax, in case should bind api key specific domains, entitled receive data.
Comments
Post a Comment