ApproveAccount
const url = 'https://example.com/hopbox.admin.v1.AccountService/ApproveAccount';const options = { method: 'POST', headers: { 'Connect-Protocol-Version': '1', 'Connect-Timeout-Ms': '1000', 'Content-Type': 'application/json' }, body: '{"accountId":"example","tier":"ACCOUNT_TIER_UNSPECIFIED"}'};
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.admin.v1.AccountService/ApproveAccount \ --header 'Connect-Protocol-Version: 1' \ --header 'Connect-Timeout-Ms: 1000' \ --header 'Content-Type: application/json' \ --data '{ "accountId": "example", "tier": "ACCOUNT_TIER_UNSPECIFIED" }'ApproveAccount makes a pending account active, with the tier full or limited. The person gets an email, if the install sends mail. An account that is not pending fails with FAILED_PRECONDITION.
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”ApproveAccountRequest names the pending account, and its tier.
object
Account_id is the UUID of the account.
Tier is the tier of the account after the approve. ACCOUNT_TIER_UNSPECIFIED gives ACCOUNT_TIER_FULL.
Responses
Section titled “Responses”Success
ApproveAccountResponse holds the account after the change.
object
object
Id is the UUID of the account.
Display_name is the display name of the account.
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.
State says whether the account can act.
Tier says which limits apply to the account. It keeps its value through a suspension.
Instance_admin is true when the account is an instance admin.
Personal_org_id is the UUID of the personal org of the account.
Suspend_time is the start of the suspension. It is unset for an account that is not suspended.
Suspend_reason is the reason of the suspension, or empty.
Version grows by 1 with each change of the account.
Create_time is the time when the account was created.
Sign_in_methods lists the kinds of the sign-in methods of the account once each: email_link, login_link, github, or google.
Sign_up is the sign-up of the account. It is unset for an account from before the sign-up modes, or of a first-admin login link.
object
Method is the kind of the first sign-in: email_link, github, or google.
Client_ip is the IP address that started the first sign-in, or empty.
Github_login is the GitHub login of a GitHub sign-up, or empty.
Github_create_time is the creation time of the GitHub user of a GitHub sign-up. A GitHub user made the same day is a hint of abuse. It is unset for another sign-up.
Note is the note of a pending account to the instance admins, at most 500 characters, or empty.
Create_time is the time of the sign-up.
Example
{ "account": { "state": "ACCOUNT_STATE_UNSPECIFIED", "tier": "ACCOUNT_TIER_UNSPECIFIED", "suspendTime": "2023-01-15T01:30:15.01Z", "createTime": "2023-01-15T01:30:15.01Z", "signUp": { "githubCreateTime": "2023-01-15T01:30:15.01Z", "createTime": "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"}