เริ่มเลย
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ใช้ Google APIs จากโปรเจ็กต์ Google Cloud คู่มือนี้จะอธิบายถึง
ในการสร้างโปรเจ็กต์ Google Cloud โดยการเปิดใช้ OR API ใน
และรับคีย์ API เพื่อเรียกใช้ปลายทาง API
สร้างโปรเจ็กต์ Google Cloud
เมื่อใช้บัญชีที่ Google โฮสต์
สร้าง
โปรเจ็กต์ในคอนโซล Google Cloud หากเครื่องมือแก้โจทย์ที่คุณตั้งใจจะใช้คือ
ภายใต้โปรแกรมผู้ทดสอบที่เชื่อถือได้
คู่มือก่อน
เปิดใช้ API
รับคีย์ API
นำทางไปที่
ข้อมูลเข้าสู่ระบบ
เมนู
คลิก "+ สร้างข้อมูลรับรอง"
เลือกคีย์ API
บันทึกคีย์ API ในไฟล์ credentials.json
โดยมีเนื้อหาต่อไปนี้
{
"key": "your_api_key"
}
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-08-29 UTC
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2024-08-29 UTC"],[[["Google Cloud projects are necessary to utilize Google APIs, and this guide outlines the setup process for accessing the Optimization Routing API (OR API)."],["The process involves three main steps: creating a Google Cloud project, enabling the OR API within the project, and generating an API key for authentication."],["Before proceeding, ensure you have a Google account, and if utilizing a solver under a trusted tester program, refer to the provided guide for specific instructions."],["Once enabled, you'll need to obtain an API key through the Google Cloud console and securely store it in a 'credentials.json' file for API access."]]],["The process involves three core steps: creating a Google Cloud project, enabling the OR API within that project, and obtaining an API key. First, create a project via the Google Cloud console. Second, enable the OR API by navigating to the APIs library and clicking \"Enable.\" Finally, generate an API key through the credentials menu, saving it to a `credentials.json` file with the specified format. This API key is needed to call the API endpoints.\n"]]