API Reports: report sull'attività dei token di autorizzazione
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Il report sull'attività dei token di autorizzazione restituisce informazioni su siti web e applicazioni di terze parti a cui i tuoi utenti hanno concesso l'accesso. Ogni report
utilizza la richiesta dell'endpoint di base del report con parametri specifici del report, ad esempio
il dominio di terze parti o gli ambiti di autorizzazione concessi. Il periodo di tempo
massimo per ogni report è di 180 giorni.
Il report sull'attività dei token OAuth può essere utilizzato solo per scopi leciti in conformità al Contratto con il cliente.
Recuperare tutti gli eventi dei token di autorizzazione per un dominio
Per recuperare tutti gli eventi di autorizzazione per applicazioni di terze parti, utilizza la
seguente richiesta HTTP GET e includi il token di autorizzazione descritto nella
documentazione sull'autorizzazione.
Per ulteriori informazioni sulle stringhe di query della richiesta e sulle proprietà della risposta,
consulta il riferimento API.
Per favorire la leggibilità, il seguente esempio è formattato con ritorni a capo:
GET https://admin.googleapis.com/admin/reports/v1/activity/users/all
/applications/token?endTime=end date&startTime=start date
&maxResults=maximum number of events returned on a response page
L'esempio seguente recupera un report su tutti gli eventi di autorizzazione del tuo account
negli ultimi 180 giorni. Il parametro della query maxResults fa in modo che questo report restituisca
25 risultati per pagina.
GET https://admin.googleapis.com/admin/reports/v1/activity/users/all/applications/token?maxResults=25
Recuperare gli eventi del token di autorizzazione per nome evento
In alcuni casi, potresti voler recuperare eventi specifici, ad esempio se l'accesso di un'applicazione è stato revocato. Per farlo, utilizza una richiesta HTTP GET
nel seguente formato:
GET https://admin.googleapis.com/admin/reports/v1/activity/users/all
/applications/token?maxResults=maximum number of events returned on a response page
&eventName=name of the OAuth token event
L'esempio seguente mostra come recuperare tutti gli eventi revoke per un dominio:
GET https://admin.googleapis.com/admin/reports/v1/activity/users/all/applications/token?eventName=revoke&maxResults=25
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-08-29 UTC."],[],[],null,["# Reports API: Authorization Tokens Activity Report\n\nThe authorization token activity report returns information about third party\nwebsites and applications your users have granted access for. Each report\nuses the basic report endpoint request with report-specific parameters such\nas the third party domain or authorization scopes granted. The maximum time\nperiod for each report is the last 180 days.\n\nThe OAuth token activity report may be used only for lawful purposes in accordance with your Customer Agreement.\n\nRetrieve all authorization token events for a domain\n----------------------------------------------------\n\nTo retrieve all authorization events for third party applications, use the\nfollowing `GET` HTTP request and include the authorization token described in the\n[authorization documentation](https://developers.google.com/workspace/admin/reports/v1/guides/authorizing.html).\nFor more information about the request query strings and response properties,\nsee the [API Reference](/workspace/admin/reports/v1/reference/activity-ref-appendix-a/token-event-names).\nFor readability purposes, the following example is formatted with line returns: \n\n```\nGET https://admin.googleapis.com/admin/reports/v1/activity/users/all\n/applications/token?endTime=end date&startTime=start date\n&maxResults=maximum number of events returned on a response page\n```\n\nThe following example gets a report on all of your account's authorization events\nfor the past 180 days. The `maxResults` query parameter has this report return\n25 results per page. \n\n```\nGET https://admin.googleapis.com/admin/reports/v1/activity/users/all/applications/token?maxResults=25\n```\n\nRetrieve authorization token events by event name\n-------------------------------------------------\n\nIn some instances, you may want to retrieve specific events, such as whether an\napplication's access has been revoked. To do this, use a `GET` HTTP request\nof the following form: \n\n```\nGET https://admin.googleapis.com/admin/reports/v1/activity/users/all\n/applications/token?maxResults=maximum number of events returned on a response page\n&eventName=name of the OAuth token event\n```\n\nThe following example shows how to retrieve all `revoke` events for a domain: \n\n```\nGET https://admin.googleapis.com/admin/reports/v1/activity/users/all/applications/token?eventName=revoke&maxResults=25\n```"]]