bind_auth_service

To connect or disconnect an authentication service, use the following request:

Copied!
svc=user/bind_auth_service&params={
									"service":"<text>",
									"token":"<text>",
									"mode":<bool>,
									"serviceId":"<text>",
									"userId":<long>
								  }

Parameters

The required parameters are marked with an asterisk (*).

Parameter Description
service* Authentication service URL.
token* Authentication service access token.
mode* 1 to connect, 0 to disconnect.
serviceId* ID from the authentication service.
userId User for whom the authentication service connection/disconnection will be made.

Response

If the request is completed successfully, the following result is returned:

Copied!
{
	<auth_service>:<auth_param> /* "gmail":"john.doe@gmail.com" for google example */
}

Otherwise, an error code is returned.

Error codes

Error code Description
7 Failed to fetch the user with ACL(ADF_ACL_USER_OPERATE_AS).
6 The request is not supported on the server, or failed to connect/disconnect the authentication service.
4 The current user is not found, or the authentication service is not supported on the server, or a wrong user was specified.
1002 The user already exists.

If you find a mistake in the text, please select it and press Ctrl+Enter.