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
Successful response
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. |
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 an 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. |
Successful response
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. |
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 an 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 | 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 | |
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,
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,
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__token,
projectsId,
appsId
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ token }}',
'{{ projectsId }}',
'{{ appsId }}'
RETURNING
name,
displayName,
token,
updateTime
;
# Description fields are for documentation purposes
- name: debug_tokens
props:
- name: projectsId
value: string
description: Required parameter for the debug_tokens resource.
- name: appsId
value: string
description: Required parameter for the debug_tokens resource.
- name: name
value: string
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: string
description: >
Required. A human readable display name used to identify this debug token.
- name: token
value: string
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 an 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__token = '{{ token }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND appsId = '{{ appsId }}' --required
AND debugTokensId = '{{ debugTokensId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
displayName,
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;