Generates a CSE token which can be used to create or update CSE files.
HTTP request
GET https://www.googleapis.com/drive/v3/files/generateCseToken
The URL uses gRPC Transcoding syntax.
Query parameters
| Parameters | |
|---|---|
fileId |
The ID of the file for which the JWT should be generated. If not provided, an id will be generated. |
parent |
The ID of the expected parent of the file. Used when generating a JWT for a new CSE file. If specified, the parent will be fetched, and if the parent is a shared drive item, the shared drive's policy will be used to determine the KACLS that should be used. It is invalid to specify both fileId and parent in a single request. |
Request body
The request body must be empty.
Response body
JWT and associated metadata used to generate CSE files.
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{ "fileId": string, "currentKaclsId": string, "currentKaclsName": string, "jwt": string, "kind": string } |
| Fields | |
|---|---|
fileId |
The fileId for which the JWT was generated. |
currentKaclsId |
The current Key ACL Service (KACLS) ID associated with the JWT. |
currentKaclsName |
Name of the KACLs that the returned KACLs ID points to. |
jwt |
The signed JSON Web Token (JWT) for the file. |
kind |
Output only. Identifies what kind of resource this is. Value: the fixed string |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/docshttps://www.googleapis.com/auth/drive
Some scopes are restricted and require a security assessment for your app to use them. For more information, see the Authorization guide.