Rozpocznij
Interfejsy API Google są wykorzystywane z projektów Google Cloud. Z tego przewodnika dowiesz się,
procesu tworzenia projektu Google Cloud i włączania interfejsu OR API w takim
projektu i uzyskiwania klucza interfejsu API
do wywoływania punktów końcowych API.
Utwórz projekt Google Cloud
Za pomocą konta na serwerze Google
utwórz
projekt w konsoli Google Cloud. Jeśli rozwiązaniem, którego chcesz użyć, jest
w ramach programu dla zaufanych testerów, postępuj zgodnie z
przewodnik.
Włącz API
Uzyskiwanie klucza interfejsu API
Przejdź do
dane logowania
.
Kliknij „+ UTWÓRZ DANE LOGOWANIA”
Wybierz klucz interfejsu API
Zapisz klucz interfejsu API w pliku credentials.json
o następującej treści:
{
"key": "your_api_key"
}
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2024-08-29 UTC.
[null,null,["Ostatnia aktualizacja: 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."]]],[]]