Looks like you haven't passed client_id into the SC.initialize method


#1

SC.initialize({
  client_id: 'YOUR_CLIENT_ID'
});

<!doctype html>
<html>
    <head>
        
        <script src="https://connect.soundcloud.com/sdk.js"></script>
    </head>
    <body>
        
    </body>
</html>

What is wrong with this code?


#2

It looks like you are missing a link to your script.js file.

<script src="script.js"></script>

#3

I inserted the link but still I get the same error..


#4

Let's have a look at your updated code.


#5

    <!doctype html>
    <html>
    <head>
        
        <script src="script.js"></script>
        <script src="https://connect.soundcloud.com/sdk.js"></script>
    </head>
    <body>
        
    </body>
</html>

JS:-

SC.initialize({
    
        client_id: 'Your_CLIENT_ID'
    
    });

#6

With your code, I'm seeing this error in the terminal:

Uncaught ReferenceError: SC is not defined

Put your sdk.js file above your script.js file so that SC will be defined before we try to SC.initialize


#7

Now getting this error :confounded:
Oops, try again. You haven't specified the correct client_id (YOUR_CLIENT_ID)


#8

You have some lowercase letters in there that need to be changed:

'Your_CLIENT_ID'


#9

:sweat_smile::sweat_smile::sweat_smile::sweat_smile:
Thanks a lot


#11

could any one help me with that code please.

<!doctype html>
<html>
    <head>
        <script src ="https://connect.soundcloud.com/sdk.js" ></script>   
        <script src="script.js">
       
        </script>
    </head>
    <body>
        
    </body>
</html>
sc.initialize({
            client_id:'YOUR_CLIENT_ID'
            });