Fork of Pleroma with site-specific changes and feature branches https://git.pleroma.social/pleroma/pleroma
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Pleroma-API.md 3.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. # Authentication
  2. Requests that require it can be authenticated with [an OAuth token](https://tools.ietf.org/html/rfc6749), the `_pleroma_key` cookie, or [HTTP Basic Authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization).
  3. # Request parameters
  4. Request parameters can be passed via [query strings](https://en.wikipedia.org/wiki/Query_string) or as [form data](https://www.w3.org/TR/html401/interact/forms.html). Files must be uploaded as `multipart/form-data`.
  5. # Endpoints
  6. ## `/api/pleroma/emoji`
  7. ### Lists the custom emoji on that server.
  8. * Method: `GET`
  9. * Authentication: not required
  10. * Params: none
  11. * Response: JSON
  12. * Example response: `{"kalsarikannit_f":"/finmoji/128px/kalsarikannit_f-128.png","perkele":"/finmoji/128px/perkele-128.png","blobdab":"/emoji/blobdab.png","happiness":"/finmoji/128px/happiness-128.png"}`
  13. ## `/api/pleroma/follow_import`
  14. ### Imports your follows, for example from a Mastodon CSV file.
  15. * Method: `POST`
  16. * Authentication: required
  17. * Params:
  18. * `list`: STRING or FILE containing a whitespace-separated list of accounts to follow
  19. * Response: HTTP 200 on success, 500 on error
  20. * Note: Users that can't be followed are silently skipped.
  21. ## `/api/pleroma/captcha`
  22. ### Get a new captcha
  23. * Method: `GET`
  24. * Authentication: not required
  25. * Params: none
  26. * Response: Provider specific JSON, the only guaranteed parameter is `type`
  27. * Example response: `{"type": "kocaptcha", "token": "whatever", "url": "https://captcha.kotobank.ch/endpoint"}`
  28. ## `/api/pleroma/delete_account`
  29. ### Delete an account
  30. * Method `POST`
  31. * Authentication: required
  32. * Params:
  33. * `password`: user's password
  34. * Response: JSON. Returns `{"status": "success"}` if the deletion was successful, `{"error": "[error message]"}` otherwise
  35. * Example response: `{"error": "Invalid password."}`
  36. ## `/api/account/register`
  37. ### Register a new user
  38. * Method `POST`
  39. * Authentication: not required
  40. * Params:
  41. * `nickname`
  42. * `fullname`
  43. * `bio`
  44. * `email`
  45. * `password`
  46. * `confirm`
  47. * `captcha_solution`: optional, contains provider-specific captcha solution,
  48. * `captcha_token`: optional, contains provider-specific captcha token
  49. * Response: JSON. Returns a user object on success, otherwise returns `{"error": "error_msg"}`
  50. * Example response:
  51. ```
  52. {
  53. "background_image": null,
  54. "cover_photo": "https://pleroma.soykaf.com/images/banner.png",
  55. "created_at": "Tue Dec 18 16:55:56 +0000 2018",
  56. "default_scope": "public",
  57. "description": "blushy-crushy fediverse idol + pleroma dev\nlet's be friends \nぷれろまの生徒会長。謎の外人。日本語OK. \n公主病.",
  58. "description_html": "blushy-crushy fediverse idol + pleroma dev.<br />let's be friends <br />ぷれろまの生徒会長。謎の外人。日本語OK. <br />公主病.",
  59. "favourites_count": 0,
  60. "fields": [],
  61. "followers_count": 0,
  62. "following": false,
  63. "follows_you": false,
  64. "friends_count": 0,
  65. "id": 6,
  66. "is_local": true,
  67. "locked": false,
  68. "name": "lain",
  69. "name_html": "lain",
  70. "no_rich_text": false,
  71. "pleroma": {
  72. "tags": []
  73. },
  74. "profile_image_url": "https://pleroma.soykaf.com/images/avi.png",
  75. "profile_image_url_https": "https://pleroma.soykaf.com/images/avi.png",
  76. "profile_image_url_original": "https://pleroma.soykaf.com/images/avi.png",
  77. "profile_image_url_profile_size": "https://pleroma.soykaf.com/images/avi.png",
  78. "rights": {
  79. "delete_others_notice": false
  80. },
  81. "screen_name": "lain",
  82. "statuses_count": 0,
  83. "statusnet_blocking": false,
  84. "statusnet_profile_url": "https://pleroma.soykaf.com/users/lain"
  85. }
  86. ```
  87. ## `/api/pleroma/admin/`…
  88. See [Admin-API](Admin-API.md)