Skip to content

ApproveAccount

POST
/hopbox.admin.v1.AccountService/ApproveAccount
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.

Connect-Protocol-Version
Connect-Protocol-Version

Define the version of the Connect protocol

number
Allowed value: 1

Define the version of the Connect protocol

Example

1
Connect-Timeout-Ms
Connect-Timeout-Ms

Define the timeout, in ms

number

Define the timeout, in ms

Example

1000
Media typeapplication/json
ApproveAccountRequest

ApproveAccountRequest names the pending account, and its tier.

object
accountId
account_id

Account_id is the UUID of the account.

string
tier
tier

Tier is the tier of the account after the approve. ACCOUNT_TIER_UNSPECIFIED gives ACCOUNT_TIER_FULL.

string
Allowed values: ACCOUNT_TIER_UNSPECIFIED ACCOUNT_TIER_LIMITED ACCOUNT_TIER_FULL

Success

Media typeapplication/json
ApproveAccountResponse

ApproveAccountResponse holds the account after the change.

object
account
account
object
id
id

Id is the UUID of the account.

string
displayName
display_name

Display_name is the display name of the account.

string
emails
emails

Emails lists the emails of the account.

Array<object>
AccountEmail

AccountEmail is one email of an account.

object
email
email

Email is the address, in lower case.

string
verified
verified

Verified is true when a sign-in method proved the email.

boolean
state
state

State says whether the account can act.

string
Allowed values: ACCOUNT_STATE_UNSPECIFIED ACCOUNT_STATE_PENDING ACCOUNT_STATE_ACTIVE ACCOUNT_STATE_SUSPENDED
tier
tier

Tier says which limits apply to the account. It keeps its value through a suspension.

string
Allowed values: ACCOUNT_TIER_UNSPECIFIED ACCOUNT_TIER_LIMITED ACCOUNT_TIER_FULL
instanceAdmin
instance_admin

Instance_admin is true when the account is an instance admin.

boolean
personalOrgId
personal_org_id

Personal_org_id is the UUID of the personal org of the account.

string
suspendTime
suspend_time

Suspend_time is the start of the suspension. It is unset for an account that is not suspended.

string format: date-time
suspendReason
suspend_reason

Suspend_reason is the reason of the suspension, or empty.

string
version
version

Version grows by 1 with each change of the account.

string format: int64
createTime
create_time

Create_time is the time when the account was created.

string format: date-time
signInMethods
sign_in_methods

Sign_in_methods lists the kinds of the sign-in methods of the account once each: email_link, login_link, github, or google.

Array<string>
signUp
sign_up

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
method

Method is the kind of the first sign-in: email_link, github, or google.

string
clientIp
client_ip

Client_ip is the IP address that started the first sign-in, or empty.

string
githubLogin
github_login

Github_login is the GitHub login of a GitHub sign-up, or empty.

string
githubCreateTime
github_create_time

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.

string format: date-time
note
note

Note is the note of a pending account to the instance admins, at most 500 characters, or empty.

string
createTime
create_time

Create_time is the time of the sign-up.

string format: date-time

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"
}
}
}

Error

Media typeapplication/json
Connect Error
object
code

The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].

string
Allowed values: canceled unknown invalid_argument deadline_exceeded not_found already_exists permission_denied resource_exhausted failed_precondition aborted out_of_range unimplemented internal unavailable data_loss unauthenticated
message

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.

string
details

A list of messages that carry the error details. There is no limit on the number of messages.

Array<object>

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
type

A URL that acts as a globally unique identifier for the type of the serialized message. For example: type.googleapis.com/google.rpc.ErrorInfo.

string
value

The Protobuf message, serialized as bytes and base64-encoded. The specific message type is identified by the type field.

string format: byte
debug
Debug

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
key
additional properties
any
key
additional properties
any
key
additional properties
any

Example

{
"code": "canceled"
}