Skip to content

Instantly share code, notes, and snippets.

@boomtrain-support
Created September 1, 2015 00:30
Show Gist options
  • Select an option

  • Save boomtrain-support/ed58fc907d2eb8e08a2d to your computer and use it in GitHub Desktop.

Select an option

Save boomtrain-support/ed58fc907d2eb8e08a2d to your computer and use it in GitHub Desktop.
GET /person - Retrieve a User by email using jQuery
<script>
// Retrieve a User by email
function getPersonEmail() {
// Send a jQuery AJAX request to retrieve the User
$.ajax({
url: 'https://api.boomtrain.com/person?email={email}',
// Replace with your Username, Password, and App Id
headers: {
'x-app-id': '{app_id}',
'Content-Type': 'application/json',
'Authorization': 'Basic ' + btoa('{username}:{password}')
},
type: 'GET',
success: function(msg) {
console.log(msg);
}
});
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment