跳到主要内容

signupThirdPartyAccount

EmployeeWrapper signupThirdPartyAccount(SignupAccountRequestDto)

POST /api/2.0/people/thirdparty/signup

Sign up with a provider

Creates a portal profile from a third-party identity and joins the invitation the key belongs to, which is how a person accepts an invitation by signing in with a provider instead of setting a password. It needs no authentication, but it does need a valid invitation: key has to be the key of a live invitation link, and serializedProfile has to be the profile a completed provider authorization produced. The resulting type comes from the invitation link itself, and employeeType only says which type to look the link up as, defaulting to RoomAdmin. When the identity or its email already belongs to a portal profile, that existing profile is returned and the provider is linked to it instead of a second account being created, so the call can be repeated safely. The answer is the profile the caller ends up with - and it is empty, still with status 200, when the provider authorization was cancelled or when the profile could not be created, so check for an empty body instead of relying on the status alone. A weixin or nextcloud identity carries no email address, so the portal generates one and the profile stays in the AutoGenerated activation state; every other provider has to supply an email.

Parameters​

NameInTypeDescriptionNotes
SignupAccountRequestDtobodySignupAccountRequestDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200The profile linked to the third-party identity, or an empty body when the authorization was cancelled or the profile could not be createdEmployeeWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400The request body cannot be read or has no key or serializedProfile, or serializedProfile is empty or was issued by another portal--
403The invitation link is invalid or has expired, or the email already belongs to a profile that has not been activated yet--
500The serializedProfile value is not one the login flow produced, the provider authorization ended with an error other than a cancellation, or the identity has no email and the provider cannot generate one--
429Too Many Requests.ErrorApiResponseRetry-After
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

EmployeeWrapper

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json