Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
<ph type="x-smartling-placeholder">
Génère de nouveaux identifiants pour le compte de service associé
pour les entreprises. Le compte de service appelant doit avoir été récupéré en appelant
Enterprises.GetServiceAccount et doit avoir été défini comme entreprise
en appelant Enterprises.SetAccount.
Seul le type de clé doit être renseigné dans la ressource à
inséré.
Requête
Requête HTTP
POST https://www.googleapis.com/androidenterprise/v1/enterprises/enterpriseId/serviceAccountKeys
Paramètres
Nom du paramètre
Valeur
Description
Paramètres de chemin d'accès
enterpriseId
string
ID de l'entreprise.
Autorisation
Cette requête nécessite une autorisation ayant le champ d'application suivant:
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/26 (UTC).
[null,null,["Dernière mise à jour le 2025/07/26 (UTC)."],[[["\u003cp\u003eThis method generates new credentials for the service account linked to an enterprise, requiring prior retrieval and setup of the service account.\u003c/p\u003e\n"],["\u003cp\u003eIt's crucial to note that this method is deprecated and will be inaccessible after September 30, 2025, with alternative recommendations available for new integrations.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization is necessary using the \u003ccode\u003ehttps://www.googleapis.com/auth/androidenterprise\u003c/code\u003e scope.\u003c/p\u003e\n"],["\u003cp\u003eThe request involves specifying the enterprise ID and the desired key type (either \u003ccode\u003egoogleCredentials\u003c/code\u003e or \u003ccode\u003epkcs12\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eA successful response will return a \u003ccode\u003eServiceaccountkeys\u003c/code\u003e resource containing the generated credentials.\u003c/p\u003e\n"]]],[],null,["# Serviceaccountkeys: insert\n\n| **Note:** Requires [authorization](#auth).\n\n\u003cbr /\u003e\n\n| **Deprecated:** New integrations cannot use this method and can refer to our [new\n| recommendations](/android/work/deprecations#recommended_alternative_4). \n| **This method will no longer be accessible by\n| anyone after September 30, 2025.**\nGenerates new credentials for the service account associated with this enterprise. The calling service account must have been retrieved by calling Enterprises.GetServiceAccount and must have been set as the enterprise service account by calling Enterprises.SetAccount. \n\nOnly the type of the key should be populated in the resource to be inserted.\n\n\u003cbr /\u003e\n\nRequest\n-------\n\n### HTTP request\n\n```\nPOST https://www.googleapis.com/androidenterprise/v1/enterprises/enterpriseId/serviceAccountKeys\n```\n\n### Parameters\n\n| Parameter name | Value | Description |\n|----------------|----------|---------------------------|\n| **Path parameters** |||\n| `enterpriseId` | `string` | The ID of the enterprise. |\n\n### Authorization\n\nThis request requires authorization with the following scope:\n\n| Scope |\n|-----------------------------------------------------|\n| `https://www.googleapis.com/auth/androidenterprise` |\n\nFor more information, see the [authentication and authorization](/android/work/play/emm-api/v1/how-tos/authorizing) page.\n\n### Request body\n\nIn the request body, supply a [Serviceaccountkeys resource](/android/work/play/emm-api/v1/serviceaccountkeys#resource) with the following properties:\n\n| Property name | Value | Description | Notes |\n|---------------|----------|---------------------------------------------------------------------------------------------------------------|-------|\n| **Required Properties** ||||\n| `type` | `string` | The file format of the generated key data. \u003cbr /\u003e Acceptable values are: - \"`googleCredentials`\" - \"`pkcs12`\" | |\n\nResponse\n--------\n\nIf successful, this method returns a [Serviceaccountkeys resource](/android/work/play/emm-api/v1/serviceaccountkeys#resource) in the response body."]]