Rozpocznij
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
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.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["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."]]],["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"]]