ก่อนใช้ Google API คุณต้องเปิดใช้ API ในโปรเจ็กต์ที่อยู่ในระบบคลาวด์ของ Google คุณเปิด API อย่างน้อย 1 รายการในโปรเจ็กต์ Google Cloud เดียวได้ หากยังไม่มีโปรเจ็กต์ Google Cloud โปรดดูสร้างโปรเจ็กต์ Cloud
วิธีเปิดใช้ API ในโปรเจ็กต์ที่อยู่ในระบบคลาวด์
คอนโซล Google Cloud
- ในคอนโซล Google Cloud ให้ไปที่เมนู > API และบริการ > คลัง > Google Workspace
- คลิก API ที่ต้องการเปิด
- คลิกเปิดใช้
- หากต้องการเปิดใช้ API อื่นๆ ให้ทำตามขั้นตอนเหล่านี้ซ้ำ
Google Cloud CLI
- ติดตั้งหรือเปิดอินเทอร์เฟซบรรทัดคำสั่ง (CLI) ของ Google Cloud
-
เรียกใช้คำสั่ง
services enableโดยระบุบริการ API ที่จะเปิดใช้gcloud services enable API_SERVICE_ID
(ไม่บังคับ) ลองใช้ Google Workspace API ในแอปเวอร์ชันทดลอง
หากกำลังทดลองใช้ Google Workspace ให้ใช้ทางลัดต่อไปนี้ ซึ่งจะเปิดใช้ Google Workspace API ที่ได้รับความนิยม และสร้างข้อมูลเข้าสู่ระบบ OAuth ที่คุณใช้ได้
หากคุณกำลังพัฒนาแอปที่เข้าถึงข้อมูลผู้ใช้ คุณต้องกำหนดค่าหน้าจอขอความยินยอม OAuth ก่อนที่จะเผยแพร่แอป
คลิกปุ่มนี้เพื่อเลือกหรือสร้างโปรเจ็กต์ที่อยู่ในระบบคลาวด์ของ Google และเปิดใช้ Workspace API โดยอัตโนมัติ
ในกล่องโต้ตอบที่ปรากฏขึ้น ให้คลิกดาวน์โหลดการกำหนดค่าไคลเอ็นต์ แล้วบันทึกcredentials.json ลงในไดเรกทอรีการทำงาน
ดูโปรแกรมสำรวจ Google Workspace APIs เพื่อดูรายการ API ทั้งหมดที่พร้อมใช้งานอย่างละเอียด และลองใช้วิธีการที่เฉพาะเจาะจงจากเบราว์เซอร์ของคุณ
API ที่เปิดใช้ (คลิกเพื่อขยาย)
ปุ่มนี้จะเปิดใช้ API ต่อไปนี้
- Admin SDK API
- Apps Script API
- Calendar API
- Chat API
- Classroom API
- Docs API
- API ไดรฟ์
- Forms API
- Gmail API
- API ส่วนเสริมของ Google Workspace
- Google Keep API
- REST API ของ Meet
- Sheets API
- Slides API
Google Workspace API
ใช้ลิงก์คอนโซล Google Cloud ต่อไปนี้หรืออินเทอร์เฟซบรรทัดคำสั่ง (CLI) ของ Google Cloud เพื่อเปิดใช้ Google Workspace API ที่เฉพาะเจาะจงในโปรเจ็กต์ที่อยู่ในระบบคลาวด์
Admin SDK API |
เปิดใช้ Admin SDK API
|
Alert Center API |
เปิดใช้ Alert Center API
|
Apps Script API |
เปิดใช้ Apps Script API
|
CalDAV API |
เปิดใช้ CalDAV API
|
Calendar API |
เปิดใช้ Calendar API
|
Chat API |
เปิดใช้ Chat API
|
Classroom API |
เปิดใช้ Classroom API
|
Cloud Identity API |
เปิดใช้ Cloud Identity API
|
Cloud Search API |
เปิดใช้ Cloud Search API
|
Docs API |
เปิดใช้ Docs API
|
Drive API |
เปิดใช้ Drive API
|
Drive Activity API |
เปิดใช้ Drive Activity API
|
Drive Labels API |
เปิดใช้ Drive Labels API
|
Forms API |
เปิดใช้ Forms API
|
Gmail API |
เปิดใช้ Gmail API
|
Groups Migration API |
เปิดใช้ Groups Migration API
|
Groups Settings API |
เปิดใช้ Groups Settings API
|
API ส่วนเสริมของ Google Workspace |
เปิดใช้ API ส่วนเสริมของ Google Workspace
|
Google Keep API |
เปิดใช้ Google Keep API
|
Enterprise License Manager API |
เปิดใช้ Enterprise License Manager API
|
Marketplace API |
เปิดใช้ Marketplace API
|
SDK ของ Marketplace |
เปิดใช้ Marketplace SDK
|
Meet REST API |
เปิดใช้ Meet REST API
|
People API |
เปิดใช้ People API
|
Postmaster Tools API |
เปิดใช้ Postmaster Tools API
|
Reseller API |
เปิดใช้ Reseller API
|
Sheets API |
เปิดใช้ Sheets API
|
Slides API |
เปิดใช้ Slides API
|
Tasks API |
เปิดใช้ Tasks API
|
Vault API |
เปิดใช้ Vault API
|
ขั้นตอนถัดไป
ดูวิธีการทำงานของการตรวจสอบสิทธิ์และการให้สิทธิ์ สำหรับ Google Workspace API