1 =============================================
2 ``POST https://devs.ouya.tv/api/v1/sessions``
3 =============================================
5 Log in and obtain a session token.
7 This token is stored in the console and used in the
8 ``X-OUYA-AuthToken`` and ``X-Token`` headers as well as the
9 ``auth_token`` GET parameter.
15 #. After logging with an existing account
16 #. After new user registration
36 ``application/x-www-form-urlencoded``
39 User name used to log in
48 When the user logged in successfully.
50 .. note:: If the user is already logged in, the old ``auth_token`` is returned.
51 No new token is issued in this case.
56 ``application/json; charset=utf-8``
58 Response body example:
60 .. include:: api-v1-sessions.response-valid.json
66 When the login data are invalid.
68 Also seen when the data were not available yet (e.g. user freshly registered)
69 but the processes on the server were not finished yet.
70 The OUYA simply tried the request a second time.
75 ``application/json; charset=utf-8``
77 Response body example:
79 .. include:: api-v1-sessions.response-invalid.json