To access the GME api you will need a username and password which will be provided to you by the GME administrator.
If you haven't received a password, please contact us on info@getmeeverywhere.co.uk
Before you can use the authorisation method, you must follow these steps:
The final step is to post to the authentication method on the API.
Once you have your token you can access the other methods on the API.
Please enter your details below and we will show you the calculation
$('#submit').click(function () {
//get email and password from fields
var pw = $("#password").val();
var eml = $("#email").val();
//calc the md5 and base64 values
var md5 = $.md5(pw)
var emailAndHash = eml + ':' + md5;
var credentials = btoa(emailAndHash);
//send a post to the api using credentials
CallAPI(credentials)
});
function CallAPI(credentials) {
$.ajax({
type: 'POST',
url: '/api/Authenticate',
headers: { 'Authorization': 'Basic ' + credentials }
}).done(function (data, txtStatus, request) {
if (data == "Authorized") {
var token = request.getResponseHeader('Token');
var expires = request.getResponseHeader('TokenExpiry');
alert('your token is ' + token);
alert('your expiry is ' + expires);
} else {
alert(data);
}
}).error(function (jqXHR, textStatus, errorThrown) {
alert(errorThrown);
});
}