saveThirdParty
ThirdPartyFolderWrapper saveThirdParty(ThirdPartyRequestDto)
POST /api/2.0/files/thirdparty
Connect a third-party account
Connects an account at a third-party storage service to the portal, or re-authenticates one that is already connected, and returns the folder that now stands for its root. Send providerId to update an existing account and omit it to connect a new one; the accepted providerKey values come from GET api/2.0/files/thirdparty/providers. The credentials to send depend on the service: the OAuth services take token, which is the authorization code from their consent screen and not an access token, while the WebDAV family and SharePoint take login with password, plus url where the server address is not fixed. Credentials are verified against the service before anything is stored, so a wrong password is refused and nothing is saved. The caller needs the rights to create rooms, and the portal-wide third-party switch has to be on, otherwise the call is refused. A new account is attached to the Rooms section and becomes available as room storage for POST api/2.0/files/rooms/thirdparty/{id}. Connecting twice with the same title creates two separate accounts.
Parameters
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| ThirdPartyRequestDto | body | ThirdPartyRequestDto | [optional] |
Responses
| Status code | Description | Type | Response headers |
|---|---|---|---|
| 200 | The root folder of the connected account | ThirdPartyFolderWrapper | X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset |
| 400 | The request body cannot be read or has no customerTitle or providerKey, providerId is neither a number nor a numeric string, or, for a new account, providerKey names no known storage service or the token or password the service needs is missing | - | - |
| 403 | The caller cannot create rooms, the portal-wide third-party switch is off or no storage service is enabled, the title of a new account is empty once invalid characters are removed, the service rejects the credentials, or providerId names an account connected by another member | - | - |
| 404 | providerId names no third-party account on the portal | - | - |
| 500 | The storage service cannot be reached or fails while the credentials are checked | - | - |
| 401 | Unauthorized | ErrorApiResponse | - |
| 429 | Too Many Requests. | ErrorApiResponse | Retry-After |
| 502 | Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON. | - | - |
| 503 | Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON. | - | - |
Return type
Authorization
Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId
HTTP request headers
- Content-Type: application/json
- Accept: application/json