VerifyLoginLink
const url = 'https://example.com/hopbox.v1.AuthService/VerifyLoginLink';const options = { method: 'POST', headers: { 'Connect-Protocol-Version': '1', 'Connect-Timeout-Ms': '1000', 'Content-Type': 'application/json' }, body: '{"token":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/hopbox.v1.AuthService/VerifyLoginLink \ --header 'Connect-Protocol-Version: 1' \ --header 'Connect-Timeout-Ms: 1000' \ --header 'Content-Type: application/json' \ --data '{ "token": "example" }'VerifyLoginLink signs in with the token of a first-admin login link, and sets the session cookie.
Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Define the version of the Connect protocol
Define the version of the Connect protocol
Example
1Define the timeout, in ms
Define the timeout, in ms
Example
1000Request Bodyrequired
Section titled “Request Bodyrequired”VerifyLoginLinkRequest holds the token of the link.
object
Token is the value after “#token=” in the link.
Example generated
{ "token": "example"}Responses
Section titled “Responses”Success
VerifyLoginLinkResponse names the account of the new session.
object
object
Id is the UUID of the account.
Display_name is the name that the person chose. It can be empty.
Emails lists the emails of the account.
AccountEmail is one email of an account.
object
Email is the address, in lower case.
Verified is true when a sign-in method proved the email. Only a verified email links other sign-in methods to the account.
Verify_time is the time of the proof. It is unset for an email that is not verified.
Instance_admin is true when the account operates the install.
Personal_org_id is the UUID of the personal org of the account.
Version grows by 1 with each change of the account.
Create_time is the time of the first sign-in.
Admin_notices counts the open notices of an instance admin, which the Admin area lists. It is 0 for any other account.
Pending is true while the account waits for approval by an instance admin. A pending account only reads its account, writes its note, deletes itself, and signs out. Each other call fails with PERMISSION_DENIED and the detail AccountPending.
Sign_up_note is the note of a pending account to the instance admins, or empty.
New_account is true when this sign-in created the account.
Session_expire_time is the end of the session, 30 days after the sign-in. A session that no call uses for 7 days ends before.
Example
{ "account": { "emails": [ { "verifyTime": "2023-01-15T01:30:15.01Z" } ], "createTime": "2023-01-15T01:30:15.01Z" }, "sessionExpireTime": "2023-01-15T01:30:15.01Z"}default
Section titled “default”Error
Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation
object
The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
A list of messages that carry the error details. There is no limit on the number of messages.
Contains an arbitrary serialized message along with a @type that describes the type of the serialized message, with an additional debug field for ConnectRPC error details.
object
A URL that acts as a globally unique identifier for the type of the serialized message. For example: type.googleapis.com/google.rpc.ErrorInfo.
The Protobuf message, serialized as bytes and base64-encoded. The specific message type is identified by the type field.
Deserialized error detail payload. The ‘type’ field indicates the schema. This field is for easier debugging and should not be relied upon for application logic.
object
Example
{ "code": "canceled"}