Skip to Content
TorBox API
Integrations

Register OAuth Link

POST /v1/api/integration/oauth/{provider}/register

Try it in the playground

POST https://api.torbox.app/v1/api/integration/oauth/{provider}/register

  • Operation ID: register_oauth_link
  • Group: Integrations
  • Auth: API key, Authorization: Bearer <api key> (Sign in with TorBox gives the same key)

Overview

Stores an OAuth link to another service on your TorBox account. Send the access token and the refresh token that the service issued for the user. TorBox does not issue these tokens: they are the token and refresh_token handed over at the end of the login started by Authenticate OAuth.

Both tokens are stored encrypted. If the account already has a link for that provider, its tokens are replaced and the link is marked active again. The tokens are not checked with the service when they are registered. The stored tokens of mal, trakt, anilist and discord links are refreshed once a day with the refresh token.

Get OAuth Integrations shows whether a trakt, mal, anilist or simkl link is stored.

Authorization

Requires an API key using the Authorization Bearer Header.

Parameters

NameInTypeRequiredDescription
providerpathstringyesThe service to link. One of google, dropbox, discord, onedrive, patreon, apple, anilist, mal, trakt or simkl.

Request body (application/json)

FieldTypeRequiredDescription
tokenstringyesOAuth access token the service issued for the user. Required.
refresh_tokenstringyesOAuth refresh token the service issued for the user. Required.

Responses

  • 200 Successful Response
  • 400 Bad Request
  • 401 Unauthorized
  • 403 Forbidden
  • 404 Not Found
  • 422 Validation Error
  • 429 Too Many Requests
  • 500 Internal Server Error
  • 503 Service Unavailable