Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

244
Vistas
Using SC.Get() from the JS library since the OAuth token in header update

Since the SC Dev's OAuth Tokens from URL to Header update i can't get the SC.Get() function of the javascript SDK to work, as it appears to pass the OAuth token in the URL rather than a header resulting in a 401 error.

Is this to be expected or am I missing something? Is it possible to set the header through the properties?

I am using this version of the sdk: https://connect.soundcloud.com/sdk/sdk-3.3.2.js

here is the Get code I am using

var route='/me/activities'      
var properties = {
  limit: 50
};
SC.get(route, properties, function(data) {})
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

This is what I'm using instead of SC.Get() now

function getStuff(route,callback){

    var xhttp = new XMLHttpRequest();
    xhttp.onreadystatechange = function() {
        if (this.readyState == 4 && this.status == 200) {
            var data=JSON.parse(this.responseText)
            console.dir(data)
            callback(data)
        }
    };

    xhttp.open("GET", "https://api.soundcloud.com"+route+"?limit=200&linked_partitioning=true", true);
    xhttp.setRequestHeader("accept", "application/json; charset=utf-8");
    xhttp.setRequestHeader("Authorization", "OAuth "+getCookie("SCaccess"));
    xhttp.send();
}

Calling it like this

getStuff(route, function (data) {
    //do stuff with data
})
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda