Skip to content

Instantly share code, notes, and snippets.

@boomtrain-support
Created August 31, 2015 17:05
Show Gist options
  • Save boomtrain-support/74ea31766e794034e039 to your computer and use it in GitHub Desktop.
Save boomtrain-support/74ea31766e794034e039 to your computer and use it in GitHub Desktop.
API Authentication - An example of basic authentication using jQuery
$.ajax({
url: 'https://api.boomtrain.com/{endpoint}',
headers: {
'x-app-id': '{app_id}',
'Authentication': 'Basic ' + btoa('{username}:{password}')
},
...
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment