Getting Started - Asking for user permissions

On the application Manager

On your application manager page:
http://developers.deezer.com/myapps/app/{app_id}/edit

You will find an "inapp" section where you can set up the permissions that will be asked to the user before accessing your application.

If you do so, each time a user enters your application, the Deezer SDK will provide the user token and user_id.

Using DZ.login

If you don't need to ask users to grant their permission at the start of your application, let the permission options empty in the manager.
You can always ask the user to grant your application more permissions at run-time if you need it.
You simply have to call the method DZ.login with the 'scope' options
Example:

DZ.login(function(){
    console.log(arguments);
}, {scope: 'manage_library,offline_access'});
            

You will find a full list of available permissions on the Deezer Developers website
http://developers.deezer.com/api/permissions

Note:
Remember that DZ.login opens a popup window. In order to avoid it from being blocked by the browser, it has to be triggered by an onclick action.