debug_tokens
Creates, updates, deletes, gets or lists a debug_tokens resource.
Overview
| Name | debug_tokens |
| Type | Resource |
| Id | firebase.appcheck.debug_tokens |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Required. The relative resource name of the debug token, in the format: projects/{project_number}/apps/{app_id}/debugTokens/{debug_token_id} |
displayName | string | Required. A human readable display name used to identify this debug token. |
etag | string | Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. This etag is strongly validated as defined by RFC 7232. |
token | string | Required. Input only. Immutable. The secret token itself. Must be provided during creation, and must be a UUID4, case insensitive. This field is immutable once set, and cannot be provided during a UpdateDebugToken request. You can, however, delete this debug token using DeleteDebugToken to revoke it. For security reasons, this field will never be populated in any response. |
updateTime | string (google-datetime) | Output only. Timestamp when this debug token was most recently updated. |
| Name | Datatype | Description |
|---|---|---|
name | string | Required. The relative resource name of the debug token, in the format: projects/{project_number}/apps/{app_id}/debugTokens/{debug_token_id} |
displayName | string | Required. A human readable display name used to identify this debug token. |
etag | string | Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. This etag is strongly validated as defined by RFC 7232. |
token | string | Required. Input only. Immutable. The secret token itself. Must be provided during creation, and must be a UUID4, case insensitive. This field is immutable once set, and cannot be provided during a UpdateDebugToken request. You can, however, delete this debug token using DeleteDebugToken to revoke it. For security reasons, this field will never be populated in any response. |
updateTime | string (google-datetime) | Output only. Timestamp when this debug token was most recently updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, appsId, debugTokensId | Gets the specified DebugToken. For security reasons, the token field is never populated in the response. | |
list | select | projectsId, appsId | pageSize, pageToken | Lists all DebugTokens for the specified app. For security reasons, the token field is never populated in the response. |
create | insert | projectsId, appsId | Creates a new DebugToken for the specified app. For security reasons, after the creation operation completes, the token field cannot be updated or retrieved, but you can revoke the debug token using DeleteDebugToken. Each app can have a maximum of 20 debug tokens. | |
patch | update | projectsId, appsId, debugTokensId | updateMask | Updates the specified DebugToken. For security reasons, the token field cannot be updated, nor will it be populated in the response, but you can revoke the debug token using DeleteDebugToken. |
delete | delete | projectsId, appsId, debugTokensId | etag | Deletes the specified DebugToken. A deleted debug token cannot be used to exchange for an App Check token. Use this method when you suspect the secret token has been compromised or when you no longer need the debug token. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
appsId | string | |
debugTokensId | string | |
projectsId | string | |
etag | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT examples
- get
- list
Gets the specified DebugToken. For security reasons, the token field is never populated in the response.
SELECT
name,
displayName,
etag,
token,
updateTime
FROM firebase.appcheck.debug_tokens
WHERE projectsId = '{{ projectsId }}' -- required
AND appsId = '{{ appsId }}' -- required
AND debugTokensId = '{{ debugTokensId }}' -- required
;
Lists all DebugTokens for the specified app. For security reasons, the token field is never populated in the response.
SELECT
name,
displayName,
etag,
token,
updateTime
FROM firebase.appcheck.debug_tokens
WHERE projectsId = '{{ projectsId }}' -- required
AND appsId = '{{ appsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
;
INSERT examples
- create
- Manifest
Creates a new DebugToken for the specified app. For security reasons, after the creation operation completes, the token field cannot be updated or retrieved, but you can revoke the debug token using DeleteDebugToken. Each app can have a maximum of 20 debug tokens.
INSERT INTO firebase.appcheck.debug_tokens (
data__name,
data__displayName,
data__etag,
data__token,
projectsId,
appsId
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ etag }}',
'{{ token }}',
'{{ projectsId }}',
'{{ appsId }}'
RETURNING
name,
displayName,
etag,
token,
updateTime
;
# Description fields are for documentation purposes
- name: debug_tokens
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the debug_tokens resource.
- name: appsId
value: "{{ appsId }}"
description: Required parameter for the debug_tokens resource.
- name: name
value: "{{ name }}"
description: |
Required. The relative resource name of the debug token, in the format: ``` projects/{project_number}/apps/{app_id}/debugTokens/{debug_token_id} ```
- name: displayName
value: "{{ displayName }}"
description: |
Required. A human readable display name used to identify this debug token.
- name: etag
value: "{{ etag }}"
description: |
Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. This etag is strongly validated as defined by RFC 7232.
- name: token
value: "{{ token }}"
description: |
Required. Input only. Immutable. The secret token itself. Must be provided during creation, and must be a UUID4, case insensitive. This field is immutable once set, and cannot be provided during a UpdateDebugToken request. You can, however, delete this debug token using DeleteDebugToken to revoke it. For security reasons, this field will never be populated in any response.
UPDATE examples
- patch
Updates the specified DebugToken. For security reasons, the token field cannot be updated, nor will it be populated in the response, but you can revoke the debug token using DeleteDebugToken.
UPDATE firebase.appcheck.debug_tokens
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__etag = '{{ etag }}',
data__token = '{{ token }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND appsId = '{{ appsId }}' --required
AND debugTokensId = '{{ debugTokensId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
displayName,
etag,
token,
updateTime;
DELETE examples
- delete
Deletes the specified DebugToken. A deleted debug token cannot be used to exchange for an App Check token. Use this method when you suspect the secret token has been compromised or when you no longer need the debug token.
DELETE FROM firebase.appcheck.debug_tokens
WHERE projectsId = '{{ projectsId }}' --required
AND appsId = '{{ appsId }}' --required
AND debugTokensId = '{{ debugTokensId }}' --required
AND etag = '{{ etag }}'
;