Skip to content

Instantly share code, notes, and snippets.

@maxali
Created March 6, 2018 20:51
Show Gist options
  • Save maxali/ca0af173f97b76e1ac9f205ff51edd66 to your computer and use it in GitHub Desktop.
Save maxali/ca0af173f97b76e1ac9f205ff51edd66 to your computer and use it in GitHub Desktop.
$.getJSON(_spPageContextInfo.webAbsoluteUrl + "/_api/sphomeservice/context?$expand=Token,Payload").then( context => {
$.ajax({
url: context.Urls[0] + "/api/v1/sites/feed?start=0&count=3&acronyms=true",
headers: {
"Authorization": "Bearer " + context.Token.access_token,
"sphome-apicontext": context.Payload
}
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment