Method: setWebAndAppActivityControl
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ตั้งค่าเว็บและ ส่วนควบคุมกิจกรรมบนแอปในบัญชีบริการ
คุณต้องเปิดใช้การตั้งค่านี้เพื่อใช้การทำงานในการโทร การตั้งค่านี้ถูกปิดใช้สำหรับบัญชีบริการในตอนแรก และจะมีการเก็บรักษาไว้จนกว่าจะตั้งเป็นค่าอื่น ซึ่งหมายความว่าต้องเปิดใช้เพียงครั้งเดียวต่อบัญชี (และไม่จำเป็นต้องเปิดใช้ 1 ครั้งต่อการทดสอบ) เว้นแต่จะปิดใช้ในภายหลัง
แสดงผลข้อผิดพลาดหากผู้โทรไม่ใช่บัญชีบริการ บัญชีผู้ใช้จะเปลี่ยนการตั้งค่านี้ได้ผ่านทางหน้าส่วนควบคุมกิจกรรม โปรดดูที่ https://support.google.com/websearch/answer/54068
คำขอ HTTP
POST https://actions.googleapis.com/v2:setWebAndAppActivityControl
URL ใช้ไวยากรณ์การแปลง gRPC
เนื้อหาของคำขอ
เนื้อหาของคำขอมีข้อมูลที่มีโครงสร้างต่อไปนี้
การแสดง JSON |
{
"enabled": boolean
} |
ช่อง |
enabled |
boolean
ควรตั้งค่าเป็นสถานะเปิดใช้หรือปิดใช้
|
เนื้อหาการตอบกลับ
หากสำเร็จ เนื้อหาการตอบกลับจะว่างเปล่า
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003eEnables or disables Web & App Activity control for service accounts, required for using call Actions.\u003c/p\u003e\n"],["\u003cp\u003eThis setting is persistent and needs to be enabled only once per account unless later disabled.\u003c/p\u003e\n"],["\u003cp\u003eReturns an error if used by non-service accounts; user accounts manage this setting through the Activity Controls page.\u003c/p\u003e\n"],["\u003cp\u003eThe request body uses a simple JSON structure with a boolean field "enabled" to set the desired state.\u003c/p\u003e\n"],["\u003cp\u003eA successful operation results in an empty response body.\u003c/p\u003e\n"]]],[],null,["# Method: setWebAndAppActivityControl\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n\nSets the Web \\& App Activity control on a service account.\n\nIt is necessary to have this setting enabled in order to use call Actions. The setting is originally disabled for service accounts, and it is preserved until set to a different value. This means it only needs to be enabled once per account (and not necessarily once per test), unless it is later disabled.\n\nReturns an error if the caller is not a service account. User accounts can change this setting via the Activity Controls page. See \u003chttps://support.google.com/websearch/answer/54068\u003e.\n\n### HTTP request\n\n`POST https://actions.googleapis.com/v2:setWebAndAppActivityControl`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation ||\n|--------------------------------|---|\n| ``` { \"enabled\": boolean } ``` |\n\n| Fields ||\n|-----------|------------------------------------------------------------------------------|\n| `enabled` | `boolean` Whether the setting should be set to an enabled or disabled state. |\n\n### Response body\n\nIf successful, the response body is empty."]]