OAuth Callback Get
GET /v1/api/integration/oauth/{provider}/callback
GET https://api.torbox.app/v1/api/integration/oauth/{provider}/callback
- Operation ID:
oauth_callback_get - Group: Integrations
- Auth: none
Overview
The address a service sends the user's browser back to after the login started by Authenticate OAuth. It is reached by the browser on its way back from the service, not called by you. The service adds its code and state to the query string.
TorBox exchanges the code for the service's tokens, looks up who the user is at that service, and redirects the browser to the TorBox website with the result in the query string:
https://torbox.app/oauth/{provider}/success?token=...&expires_in=...&expires_at=...&user_id=...&id_token=...&nonce=...&refresh_token=...
token-> the access token the service issuedrefresh_token-> the refresh token the service issuedexpires_in,expires_at-> as found in the service's token answeruser_id-> who the user is at the service. The email address forgoogleandapple, theemailfield of the Discord user fordiscord, the user id forpatreon,anilistandmal, the user name fortraktandsimkl. Not set fordropboxandonedrive.id_token-> the ID token forgoogleandapple, the Discord user id fordiscord. Not set for the other providers.nonce-> the name of the provider
A value the service did not give is sent as the text None.
This route stores nothing on a TorBox account. The tokens it hands over are the ones Register OAuth Link, Link Discord Roles and the upload routes take.
If the login was cancelled, has expired or fails, the route answers with a JSON error instead of a redirect.
Authorization
None required.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
provider | path | string | yes | The service the login was started with. One of google, dropbox, discord, onedrive, patreon, apple, anilist, mal, trakt or simkl. |
Responses
302Found400Bad Request404Not Found422Validation Error429Too Many Requests500Internal Server Error