Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 158 lines (144 sloc) 4.801 kb
0b502018 » tchapi
2012-11-28 Dear API, you deserve a better documentation. KR.
1 # User Service : login
2
3 GET user/login
4
5 ## Description
6
7 Return a session token for a user. Read the [authentication](https://github.com/Qobuz/api-documentation#application-auth) section for more information.
8
9 ***
10
11 ## Requires authentication
12
13 __Requires a valid app_id__
14
15 ***
16
17 ## Parameters
18
19 > + `app_id` - _required_ : Your Application ID (see [Application authentication](https://github.com/Qobuz/api-documentation#application-auth))
20 > + `username` - _required_ : The username of the user.
21 > + `email` - _optional_ : Alternatively, its email address.
22 > + `password` - _required_ : MD5 hash of the user password.
23
24 ***
25
26 ## Example
27 **Request**
28
29 http://www.qobuz.com/api.json/0.2/user/login?app_id=100000000&username=foo&password=3858f62230ac3c91t5f300c664312c63f
30
31 **Return**
32
33 ```json
34 {
35 "user": {
36 "id": 1,
37 "email": "apps@qobuz.com",
38 "login": "apps",
39 "firstname": "Qobuz",
40 "lastname": "Apps",
41 "country": "FR",
42 "avatar": "http://graph.facebook.com/1/picture?type=square",
43 "player_settings": {
44 "grid_view_mode": "tracks_list",
45 "lang": "FR",
46 "player_volume": 100,
47 "player_shuffle": false,
48 "player_mute": true,
49 "playlists_sort": "last_modified",
50 "player_crossfade_duration": 13,
51 "sidebar_width": 284,
52 "browser": {
53 "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.16 (KHTML, like Gecko) Chrome/24.0.1303.0 Safari/537.16",
54 "browserName": "chrome",
55 "browserVersion": 24,
56 "osName": "macintosh",
57 "platform": "MacIntel",
58 "cookieEnabled": true,
59 "language": "en-US",
60 "touchDevice": false,
61 "applicationCache": true,
62 "localStorage": true,
63 "context": "web",
64 "remoteAddr": "11.22.33.44"
65 },
66 "last_state": {
67 "datetime": 135401223,
68 "page": [
69 "playlist",
70 "1234567"
71 ],
72 "track": {
73 "paused": true,
74 "position": 3396.6209888458002,
75 "id": 1234567
76 }
77 },
78 "html5_audio_forced": true,
79 "player_remaining_time": true,
80 "player_loop": 1,
81 "featured_menu": "maximize",
82 "now_playing": "minimize",
83 "filter_columns_visible": false,
84 "grid_sort_column": "releaseDate",
85 "grid_sort_direction": true,
86 "grid_columns": [
87 "title",
88 "artist",
89 "album",
90 "releaseDate",
91 "duration"
92 ],
93 "facebook_publish_listen": true,
94 "lastfm_scrobbling": true,
95 "player_fullscreen": false,
96 "menu_hidden_items": [
97 "favorites-button"
98 ],
99 "player_crossfade": true,
100 "sidebar": "maximize",
101 "player_gapless": false,
102 "sonos_audio_format": 6,
103 "player_audio_format": 6,
104 "player_offline_format": 6,
105 "init_playback_restore": true,
106 "offline_library_cache_visible": true,
107 "facebook_auto_login": false,
108 "excluded_genre_ids": [
109 80,
110 6,
111 2,
112 94,
113 91
114 ]
115 },
116 "credential": {
117 "id": 3,
118 "label": "streaming-lossless",
119 "description": "Droits de streaming \"Qobuz Hi-Fi\"",
120 "parameters": {
121 "lossy_streaming": true,
122 "lossless_streaming": true,
123 "mobile_streaming": true,
124 "offline_streaming": true,
125 "included_format_group_ids": [
126 2,
127 3,
128 4
129 ],
130 "included_label_ids": [
131 19089,
132 15650,
133 25971
134 ],
135 "included_supplier_ids": [
136 22
137 ],
138 "color_scheme": {
139 "logo": "#B8D729"
140 },
141 "label": "Qobuz Hi-Fi",
142 "shortLabel": "Hi-Fi"
143 }
144 },
145 "externals": {
146 "lastfm": {
147 "name": "QoBuZAppSz",
148 "key": "1243567tOkEn"
149 },
150 "facebook": {
151 "id": "123456789",
152 "access_token": "1243567tOkEn"
153 }
154 }
155 },
156 "user_auth_token": "1243567tOkEn"
157 }
158 ```
Something went wrong with that request. Please try again.