funkwhale/api
Jacek Pruciak 0168632ad9 fix(api/Dockerfile): bump cryptography to 3.4.8 2022-10-30 14:24:52 +01:00
..
compose/django feat(api/Docker): automatically run migrations on container start 2022-07-25 20:59:30 +00:00
config Fix remote instance ping 2022-10-27 15:46:01 +00:00
funkwhale_api Fix remote instance ping 2022-10-27 15:46:01 +00:00
tests New task checking if remote instance is reachable to avoid playback latence 2022-10-27 12:20:31 +00:00
.coveragerc Omit coverage of CustomAutoSchema 2022-09-27 09:30:26 +00:00
.dockerignore Cleanup Gitlab CI and Dockerfiles 2022-07-11 20:20:16 +00:00
.pylintrc Initial commit that merge both the front end and the API in the same repository 2017-06-23 23:00:42 +02:00
Dockerfile fix(api/Dockerfile): bump cryptography to 3.4.8 2022-10-30 14:24:52 +01:00
Readme.md Update API readme 2022-10-29 07:04:31 +00:00
install_os_dependencies.sh See #542: ensure install_os_dependencies.sh is runnable from anywhere 2018-10-01 19:16:48 +02:00
manage.py Server CLI: user management 2019-11-25 09:45:53 +01:00
poetry.lock Update dependency coverage to v6.5.0 (develop) 2022-10-30 08:48:15 +00:00
pyproject.toml Update dependency coverage to v6.5.0 (develop) 2022-10-30 08:48:15 +00:00
setup.cfg Fix #1105: Can now launch server import from the UI 2020-08-03 13:50:53 +02:00

Readme.md

Funkwhale API

This is the Funkwhale API. Check out our API explorer for interactive documentation.

OAuth Authentication

Funkwhale uses the OAuth authorization grant flow for external apps. This flow is a secure way to authenticate apps that requires a user's explicit consent to perform actions. You can use our demo server at https://demo.funkwhale.audio for testing purposes.

To authenticate with the Funkwhale API:

  1. Create an application by sending a POST request to api/v1/oauth/apps. Include your scopes and redirect URI (use urn:ietf:wg:oauth:2.0:oob to get an authorization code you can copy)
  2. Send an authorization request to the /authorize endpoint to receive an authorization code
  3. Request an access token from /api/v1/oauth/token
  4. Use your access token to authenticate your calls with the following format: Authorization: Bearer <token>
  5. Refresh your access token by sending a refresh request to /api/v1/oauth/token

For more detailed instructions, see our API authentication documentation.

Application token authentication

If you have an account on your target pod, you can create an application at /settings/applications/new. Once you authorize the application you can retrieve an access token. Use your access token to authenticate your calls with the following format: Authorization: Bearer <token>

Rate limiting

Funkwhale supports rate-limiting as of version 0.2.0. Pod admins can choose to rate limit specific endpoints to prevent abuse and improve the stability of the service. If the server drops a request due to rate-limiting, it returns a 429 status code.

Each API call returns HTTP headers to pass the following information:

  • What was the scope of the request (X-RateLimit-Scope)
  • What is the rate-limit associated with the request scope (X-RateLimit-Limit)
  • How many more requests in the scope can be made within the rate-limit timeframe (X-RateLimit-Remaining)
  • How much time does the client need to wait to send another request (Retry-After)

For more information, check our rate limit documentation

Resources

For more information about API usage, refer to our API documentation.