Начать
API Google используются из проектов Google Cloud. В этом руководстве описывается процесс создания проекта Google Cloud, включения API OR в таком проекте и получения ключа API для вызова конечных точек API.
Создайте проект Google Cloud
Используя учетную запись, размещенную в Google, создайте проект в консоли Google Cloud. Если решатель, который вы собираетесь использовать, находится в рамках доверенной программы тестирования, сначала следуйте этому руководству .
Включить API
Получить ключ API
Перейдите в меню учетных данных .
Нажмите «+ СОЗДАТЬ УЧЕТНЫЕ ДАННЫЕ»
Выберите ключ API
Сохраните ключ API в файле credentials.json
со следующим телом.
{
"key": "your_api_key"
}
Если не указано иное, контент на этой странице предоставляется по лицензии Creative Commons "С указанием авторства 4.0", а примеры кода – по лицензии Apache 2.0. Подробнее об этом написано в правилах сайта. Java – это зарегистрированный товарный знак корпорации Oracle и ее аффилированных лиц.
Последнее обновление: 2024-11-14 UTC.
[null,null,["Последнее обновление: 2024-11-14 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"]]