Some details info
[ouya-store-api.git] / api / devs.ouya.tv / api-v1-gamers-key.put.rst
1 ==============================================
2 ``PUT https://devs.ouya.tv/api/v1/gamers/key``
3 ==============================================
4
5 Store the user's public key on the server.
6
7 Receipts/purchases are encryptd by the server with the user's public key,
8 so that only that user can decrypt it.
9
10 HTTP request
11 ============
12 Protocol
13   ``https``
14 Method
15   ``PUT``
16 Host
17   ``devs.ouya.tv``
18 Path
19   ``/api/v1/gamers/key``
20 Headers
21   Standard headers
22
23   ``Content-Type``
24     ``application/x-www-form-urlencoded``
25 GET parameters
26   ``auth_token``
27     Same data as in standard header ``X-OUYA-AuthToken``
28 POST parameters
29   ``auth_token``
30     Same data as in standard header ``X-OUYA-AuthToken``
31   ``gamer[key]``
32     string
33
34     FIXME encryption key
35   ``gamer[password]``
36     string
37
38     User account password
39   ``gamer[username]``
40     string
41
42     User account name
43
44 Example key::
45
46   -----BEGIN PUBLIC KEY-----
47   MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCvf3MvvZui5shNGbt2O0zveXrtfHZNivowNKiO
48   UagJARKCJmjOJVtZ1srCe95Eul/xBDPDEaH8vJetn5Pl99QwhdYL1ps9mUhmocx90LavQsipr2Dw
49   B7XshwN/EpW0uR/R84a3yXozpk7dgXi4+y//A+XT+MqgxsY6cdSGrBMsCQIDAQAB
50   -----END PUBLIC KEY-----
51
52
53 HTTP response
54 =============
55 Status code
56   ``201 Created``
57 Content type
58   ``application/json; charset=utf-8``
59 Body
60   ``{}``