Events: get
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
แสดงผลกิจกรรมตามรหัส Google ปฏิทิน หากต้องการเรียกข้อมูลกิจกรรมโดยใช้รหัส iCalendar ให้เรียกเมธอด events.list โดยใช้พารามิเตอร์ iCalUID
ลองใช้เลย
ส่งคำขอ
คำขอ HTTP
GET https://www.googleapis.com/calendar/v3/calendars/calendarId/events/eventId
พารามิเตอร์
ชื่อพารามิเตอร์ |
ค่า |
คำอธิบาย |
พารามิเตอร์เส้นทาง |
calendarId |
string |
ตัวระบุปฏิทิน หากต้องการเรียกข้อมูลรหัสปฏิทิน ให้เรียกใช้เมธอด calendarList.list หากต้องการเข้าถึงปฏิทินหลักของผู้ใช้ที่เข้าสู่ระบบอยู่ในปัจจุบัน ให้ใช้คีย์เวิร์ด "primary "
|
eventId |
string |
ตัวระบุเหตุการณ์
|
พารามิเตอร์การค้นหาที่ไม่บังคับ |
alwaysIncludeEmail |
boolean |
เลิกใช้งานและถูกละเว้น ระบบจะแสดงค่าในช่อง email สำหรับผู้จัด ครีเอเตอร์ และผู้เข้าร่วมเสมอ แม้ว่าจะไม่มีอีเมลจริงก็ตาม (นั่นคือ ระบบจะแสดงค่าที่สร้างขึ้นซึ่งใช้งานไม่ได้)
|
maxAttendees |
integer |
จำนวนผู้เข้าร่วมสูงสุดที่จะรวมไว้ในคำตอบ หากมีผู้เข้าร่วมมากกว่าจำนวนที่ระบุ ระบบจะแสดงเฉพาะผู้เข้าร่วม ไม่บังคับ
|
timeZone |
string |
เขตเวลาที่ใช้ในคำตอบ ไม่บังคับ ค่าเริ่มต้นคือเขตเวลาของปฏิทิน
|
การให้สิทธิ์
คำขอนี้อนุญาตการให้สิทธิ์ด้วยขอบเขตต่อไปนี้อย่างน้อย 1 รายการ
ขอบเขต |
https://www.googleapis.com/auth/calendar.readonly |
https://www.googleapis.com/auth/calendar |
https://www.googleapis.com/auth/calendar.events.readonly |
https://www.googleapis.com/auth/calendar.events |
https://www.googleapis.com/auth/calendar.app.created |
https://www.googleapis.com/auth/calendar.events.freebusy |
https://www.googleapis.com/auth/calendar.events.owned |
https://www.googleapis.com/auth/calendar.events.owned.readonly |
https://www.googleapis.com/auth/calendar.events.public.readonly |
ดูข้อมูลเพิ่มเติมได้ที่หน้าการตรวจสอบสิทธิ์และการให้สิทธิ์
เนื้อความของคำขอ
อย่าระบุเนื้อหาคำขอด้วยเมธอดนี้
ลองใช้งาน
ใช้โปรแกรมสำรวจ API ด้านล่างเพื่อเรียกใช้เมธอดนี้กับข้อมูลจริงและดูการตอบกลับ
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[],[],null,["# Events: get\n\n| **Note:** [Authorization](#auth) optional.\n\nReturns an event based on its Google Calendar ID. To retrieve an event using its iCalendar ID, call the [events.list method using the `iCalUID` parameter](/workspace/calendar/api/v3/reference/events/list#iCalUID).\n[Try it now](#try-it).\n\nRequest\n-------\n\n### HTTP request\n\n```\nGET https://www.googleapis.com/calendar/v3/calendars/calendarId/events/eventId\n```\n\n### Parameters\n\n| Parameter name | Value | Description |\n|----------------------|-----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Path parameters** |||\n| `calendarId` | `string` | Calendar identifier. To retrieve calendar IDs call the [calendarList.list](/workspace/calendar/api/v3/reference/calendarList/list) method. If you want to access the primary calendar of the currently logged in user, use the \"`primary`\" keyword. |\n| `eventId` | `string` | Event identifier. |\n| **Optional query parameters** |||\n| `alwaysIncludeEmail` | `boolean` | Deprecated and ignored. A value will always be returned in the `email` field for the organizer, creator and attendees, even if no real email address is available (i.e. a generated, non-working value will be provided). |\n| `maxAttendees` | `integer` | The maximum number of attendees to include in the response. If there are more than the specified number of attendees, only the participant is returned. Optional. |\n| `timeZone` | `string` | Time zone used in the response. Optional. The default is the time zone of the calendar. |\n\n### Authorization\n\nThis request allows authorization with at least one of the following scopes:\n\n| Scope |\n|-------------------------------------------------------------------|\n| `https://www.googleapis.com/auth/calendar.readonly` |\n| `https://www.googleapis.com/auth/calendar` |\n| `https://www.googleapis.com/auth/calendar.events.readonly` |\n| `https://www.googleapis.com/auth/calendar.events` |\n| `https://www.googleapis.com/auth/calendar.app.created` |\n| `https://www.googleapis.com/auth/calendar.events.freebusy` |\n| `https://www.googleapis.com/auth/calendar.events.owned` |\n| `https://www.googleapis.com/auth/calendar.events.owned.readonly` |\n| `https://www.googleapis.com/auth/calendar.events.public.readonly` |\n\nFor more information, see the [authentication and authorization](/workspace/guides/configure-oauth-consent) page.\n\n### Request body\n\nDo not supply a request body with this method.\n\nResponse\n--------\n\nIf successful, this method returns an [Events resource](/workspace/calendar/api/v3/reference/events#resource) in the response body.\n\nTry it!\n-------\n\n\nUse the APIs Explorer below to call this method on live data and see the response."]]