Skip to content

Instantly share code, notes, and snippets.

@codeaholicguy
Last active December 25, 2016 15:59
Embed
What would you like to do?
import SoundCloud from 'soundcloud';
const API_HOST = '//api.soundcloud.com';
export function auth() {
SoundCloud.connect().then((session) => {
fetchMe(session)
});
}
function fetchMe(session) {
fetch(`${API_HOST}/me?oauth_token=${session.oauth_token}`)
.then((res) => res.json())
.then((data) => {
console.log('me', data);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment