Razer Forge TV login endpoints
[ouya-store-api.git] / api / devs.ouya.tv / api-razer-session.rst
1 ===============================================
2 ``POST https://devs.ouya.tv/api/razer/session``
3 ===============================================
4
5 Login to the Razer Cortex store on the Razer Forge TV.
6
7 Similar to the OUYA login `POST https://devs.ouya.tv/api/v1/sessions`_,
8 but with e-mail instead of username.
9
10
11 HTTP request
12 ============
13 Protocol
14   ``https``
15 Method
16   ``POST``
17 Host
18   ``devs.ouya.tv``
19 Path
20   ``/api/razer/session``
21 Headers
22   ``User-Agent``
23     ``Dalvik/2.1.0 (Linux; U; Android 6.0.1; Forge Build/M-MMB29M-rzs-us-sf-bld2-19HP-08.02.AM)``
24   ``Accept-Language``
25     ``de``
26   ``X-OUYA-Device``
27     ``pearlyn``
28   ``X-OUYA-Firmware-Version``:
29     (empty)
30   ``X-OUYA-Console-Id``
31     Build serial number
32
33     ``171256710321511``
34   ``X-OUYA-Console-Wifi-MAC-Address``
35     ``C4:8E:8F:82:29:B1``
36   ``X-OUYA-VersionCode``
37    ``10202320``
38   ``Content-Type``
39     ``application/x-www-form-urlencoded``
40
41 POST parameters
42 ---------------
43 ``email``
44   User e-mail address
45 ``password``
46   User password
47
48
49 HTTP response
50 =============
51 Success
52 -------
53 Status code
54   ``200 OK``
55 Content-type
56   ``application/json; charset=utf-8``
57
58 After the initial login, `GET https://devs.ouya.tv/api/v1/gamers/me`_ is fetched.
59 If its reponse does not contain ``nickname``, the nickname input screen is shown.
60 The nickname is then stored via `PUT https://devs.ouya.tv/api/razer/gamer`_.
61
62 The CortexFramework code also parses properties
63 ``razerToken``, ``nickname`` and ``avatar``
64 but they do not seem to be used.
65
66 .. include:: api-razer-session.response.json
67    :code: