github.com/cozy/cozy-stack@v0.0.0-20240327093429-939e4a21320e/docs/public.md (about) 1 [Table of contents](README.md#table-of-contents) 2 3 # Public routes 4 5 These routes are public: no authentication is required for them. 6 7 ## Avatar 8 9 ### GET /public/avatar 10 11 Returns an image chosen by the user as their avatar. If no image has been 12 chosen, a fallback will be used, depending of the `fallback` parameter in the 13 query-string: 14 15 - `default`: a default image that shows the Cozy Cloud logo, but it can be 16 overriden by dynamic assets per context 17 - `initials`: a generated image with the initials of the owner's public name 18 - `404`: just a 404 - Not found error. 19 20 ## Prelogin 21 22 ### GET /public/prelogin 23 24 This route returns information that could be useful to show a login page (like 25 in the flagship app). 26 27 #### Request 28 29 ```http 30 GET /public/prelogin HTTP/1.1 31 Host: cozy.localhost:8080 32 ``` 33 34 #### Response 35 36 ```http 37 HTTP/1.1 200 OK 38 Content-Type: application/json 39 ``` 40 41 ```json 42 { 43 "Kdf": 0, 44 "KdfIterations": 100000, 45 "OIDC": false, 46 "FranceConnect": false, 47 "locale": "en", 48 "magic_link": false, 49 "name": "Claude" 50 } 51 ``` 52 53 #### Response when the instance has not been onboarded 54 55 ```http 56 HTTP/1.1 412 Precondition failed 57 Content-Type: application/json 58 ``` 59 60 ```json 61 { 62 "error": "the instance has not been onboarded" 63 } 64 ```