با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
در اینجا برخی از دستورالعمل های امنیتی و حریم خصوصی برای توسعه دهندگانی که از Google Assistant API در پروژه های خود استفاده می کنند، آورده شده است.
API و مجوز برنامه
هر برنامهای که از Google Assistant API استفاده میکند باید دارای اعتبارنامه مجوز باشد که برنامه را در سرور تأیید هویت Google شناسایی کند. به طور معمول، این اعتبارنامه ها در یک فایل client_secret_<client-id>.json دانلود شده ذخیره می شوند. مطمئن شوید که این فایل را در مکانی ذخیره کنید که فقط برنامه شما بتواند به آن دسترسی داشته باشد.
ممکن است برنامه شما از کاربر بخواهد به آن اجازه دسترسی به حساب Google خود را بدهد. در صورت اعطای مجوز، برنامه شما میتواند یک نشانه دسترسی برای آن کاربر درخواست کند. این توکن ها منقضی می شوند، اما می توان آنها را به روز کرد.
توکنهای تازهسازی محافظتنشده روی دستگاه، خطر امنیتی قابلتوجهی را به همراه دارند. از درخواست خود مطمئن شوید:
توکنهای تازهسازی را در مکانی امن ذخیره میکند.
راهی آسان برای پاک کردن نشانه ها از دستگاه ارائه می دهد. به عنوان مثال، یک دکمه "خروج از سیستم" ارائه کنید که یک نشانه (اگر برنامه دارای رابط کاربری باشد) یا یک اسکریپت خط فرمان را که کاربر می تواند اجرا کند، پاک می کند.
به کاربران اطلاع می دهد که می توانند دسترسی به حساب Google خود را غیرمجاز کنند . این نشانه رفرش را باطل می کند. برای استفاده مجدد از برنامه، کاربر نیاز به مجوز مجدد دسترسی دارد.
وقتی استفاده دائمی از دستگاه تمام شد، باید تمام نشانهها را از آن پاک کنید.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eThe Google Assistant Library for Python is deprecated; developers should utilize the Google Assistant Service instead.\u003c/p\u003e\n"],["\u003cp\u003eApplications using the Google Assistant API require authorization credentials for secure identification, and developers must store these credentials securely.\u003c/p\u003e\n"],["\u003cp\u003eApplications should provide a mechanism for users to easily clear stored refresh tokens to enhance security and user privacy.\u003c/p\u003e\n"],["\u003cp\u003eUsers can deauthorize application access to their Google account, revoking refresh tokens and requiring re-authorization for future use.\u003c/p\u003e\n"]]],["The Google Assistant Library for Python is deprecated; use the Google Assistant Service instead. Applications using the Google Assistant API need authorization credentials, typically in a `client_secret_.json` file, which must be stored securely. User-granted access tokens expire but can be refreshed. Refresh tokens should be stored securely, with an easy way for users to clear them, such as a \"Sign out\" button or script, and users can deauthorize access via their Google account settings. Devices should be cleared of all tokens when no longer in use.\n"],null,["# Best Practices for Privacy and Security\n\n| **Warning:** The Google Assistant Library for Python is deprecated as of June 28th, 2019. Use the [Google Assistant Service](/assistant/sdk/guides/service/python) instead.\n\n\u003cbr /\u003e\n\nHere are some security and privacy guidelines for developers using the Google\nAssistant API in their projects.\n\nAPI and application authorization\n---------------------------------\n\nAny application that uses the Google Assistant API must have authorization\ncredentials that identify the application to Google's authentication server.\nTypically, these credentials are stored in a downloaded `client_secret_\u003cclient-id\u003e.json`\nfile. Make sure to store this file in a location that only your application\ncan access.\n\nYour application may prompt the user to grant it access to their Google account.\nIf granted, your application can request an access token for that user. These\ntokens expire, but can be refreshed.\n\nUnprotected refresh tokens on a device pose a significant security risk. Make\nsure your application:\n\n- Stores the refresh tokens in a secure place.\n- Provides an easy way to clear tokens from the device. For example, provide a \"Sign out\" button that clears a token (if the application has a UI) or a command line script that the user can execute.\n- Informs users that they can [deauthorize access](https://myaccount.google.com/permissions) to their Google account. This revokes the refresh token; to use the application again, the user would need to re-authorize access.\n\nWhen you are done using the device permanently, you should clear all of the\ntokens from it.\n\nFor more information, see [Using OAuth 2.0 to Access Google APIs](https://developers.google.com/identity/protocols/OAuth2)."]]