Google Wallet REST API 사용자 인증 정보 생성
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Google 월렛은 HTTP를 통해 Google Wallet API에 요청을 전송하여 패스를 만들고 관리할 수 있는 REST API를 제공합니다. 이는 프로그래매틱 방식으로 패스를 사용할 서버 측 서비스를 빌드하려는 사용자에게 유용합니다.
Google Wallet REST API를 사용하려면 Google Cloud 콘솔에서 API를 사용 설정하고 Google Cloud 서비스 계정을 만든 다음 서비스 계정의 키를 생성해야 합니다.
REST API를 사용하여 패스를 만들 때 JSON 웹 토큰으로 인코딩된 패스 객체에 서명하는 데 사용되는 서비스 계정 키입니다.
패스 업데이트 또는 삭제와 같은 다른 작업의 경우, 패스 발급기관으로 인증하기 위한 요청과 함께 서비스 계정 키가 전송됩니다.
1. Google Wallet REST API 사용 설정
Google Wallet REST API를 사용 설정하려면 다음 단계를 따르세요.
- 아직 Google Cloud 계정이 없으면 Google Cloud 콘솔로 이동하여 단계에 따라 새 계정을 등록합니다.
- 콘솔 상단의 프로젝트 드롭다운 메뉴에서 사용할 Google Cloud 프로젝트를 선택하거나 새 프로젝트를 만듭니다.
- Google Cloud 콘솔 Marketplace의 Google Wallet API 제품 세부정보 페이지로 이동합니다.
- '사용' 버튼을 클릭합니다. 잠시 후 선택한 Google Cloud 프로젝트에서 Google Wallet REST API를 사용할 수 있습니다.
2. Google Cloud 서비스 계정 키 생성
Google Wallet REST API에 대한 요청을 인증하려면 서비스 계정을 만들고 다음을 수행하여 서비스 계정 키를 생성해야 합니다.
- Google Cloud 콘솔에서 '서비스 계정 만들기' 페이지로 이동합니다.
- 서비스 계정 세부정보를 입력합니다. '서비스 계정 ID' 필드 아래에 표시되는 서비스 계정의 이메일 주소를 확인합니다. 이 번호는 나중에 서비스 계정을 사용하여 Google Wallet REST API에 대한 요청을 인증할 때 필요합니다.
- '완료' 버튼을 클릭합니다. 다른 서비스 계정 만들기 단계를 완료할 필요는 없습니다.
- 페이지 상단의 '키' 메뉴 항목을 클릭합니다.
- '키 추가' 드롭다운 메뉴를 클릭한 다음 '새 키 만들기'를 클릭합니다.
- 키 유형 'JSON'을 선택합니다.
- '만들기'를 클릭하여 서비스 계정 키를 만들고 다운로드하세요.
3. Google 월렛 콘솔에서 서비스 계정 승인
서비스 계정 키를 사용하여 Google Wallet REST API에 대한 요청을 인증하려면 발급기관 계정에 서비스 계정의 이메일 주소를 사용자로 추가해야 합니다. 서비스 계정을 사용자로 추가하려면 다음 안내를 따르세요.
- Google Cloud 콘솔의 '서비스 계정' 페이지로 이동합니다.
- Google Wallet API에 대한 요청을 인증하는 데 사용할 서비스 계정의 이메일 주소를 복사합니다.
- Google Pay 및 월렛 콘솔로 이동합니다.
- 왼쪽 탐색 메뉴에서 '사용자'를 클릭합니다.
- '사용자 초대'를 클릭합니다.
- 서비스 계정의 이메일 주소를 입력합니다.
- '액세스 수준' 드롭다운에서 '개발자'를 선택합니다.
- '초대' 버튼을 클릭합니다.
서비스 계정이 추가되면 계정용으로 생성된 모든 서비스 계정 키를 사용하여 Google Wallet REST API에 대한 요청을 인증할 수 있습니다. 서비스 계정 키를 사용할 때는 매우 민감한 사용자 인증 정보이므로 안전한 서버 측 환경에서만 사용해야 합니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-29(UTC)
[null,null,["최종 업데이트: 2025-08-29(UTC)"],[[["\u003cp\u003eGoogle Wallet's REST API enables programmatic management of passes via HTTP requests, ideal for server-side integrations.\u003c/p\u003e\n"],["\u003cp\u003eTo utilize the API, enable it in the Google Cloud console, create a service account, and generate a key for authentication.\u003c/p\u003e\n"],["\u003cp\u003eThis service account key is crucial for signing JWT-encoded Passes Objects during creation and for authenticating other operations like updates and deletions.\u003c/p\u003e\n"],["\u003cp\u003eGranting 'Developer' access to the service account in the Google Pay & Wallet console authorizes API requests.\u003c/p\u003e\n"]]],["The Google Wallet REST API allows programmatic pass management via HTTP requests. To use it, enable the API in the Google Cloud console, create a service account, and generate a JSON key. This key is used to sign JSON Web Token-encoded Pass Objects for creation and authenticates requests for updates or deletions. Finally, authorize the service account by adding its email as a 'Developer' user in the Google Pay & Wallet console. This process enables secure, server-side interaction with the Google Wallet.\n"],null,["# Generating Google Wallet REST API authentication credentials\n\nGoogle Wallet offers a REST API that lets you create and manage passes by\nsending requests to the Google Wallet API over HTTP. This is useful for those who\nwant to build server-side services to work with passes programmatically.\n\nTo use the Google Wallet REST API, you must enable the API in the Google Cloud console,\ncreate a Google Cloud service account, then generate a key for the service account.\n\nWhen you create passes with the REST API, the service account key used to sign your\nJSON Web Token-encoded Passes Objects.\n\nFor other operations, such as updating or deleting passes, the service account key\nis sent with the request to authenticate you as the Pass Issuer.\n\n1. Enable the Google Wallet REST API\n------------------------------------\n\nTo enable the Google Wallet REST API, do the following:\n\n1. If you don't already have a Google Cloud account, go to the [Google Cloud console](https://console.cloud.google.com) and follow the steps to register for a new account.\n2. From the project drop-down menu at the top of the console, select the Google Cloud project you want to use, or create a new one.\n3. Go to the [Google Wallet API product details page](https://console.cloud.google.com/apis/library/walletobjects.googleapis.com) in the Google Cloud console Marketplace.\n4. Click the 'Enable' button. In a few moments, the Google Wallet REST API will be available for the selected Google Cloud project.\n\n2. Generate a Google Cloud service account key\n----------------------------------------------\n\nTo authenticate requests to the Google Wallet REST API, you'll need to create a\nservice account, and generate a service account key by doing the following:\n\n1. Go to the ['Create service account' page](https://console.cloud.google.com/iam-admin/serviceaccounts/create) in the Google Cloud console.\n2. Fill in the service account details. Note the email address for the service account that appears below the 'Service account ID' field. You will need this later when you use the service account to authenticate your requests to the Google Wallet REST API.\n3. Click the 'DONE' button. There is no need to complete the other service account creation steps.\n4. Click the 'KEYS' menu item at the top of the page.\n5. Click the 'ADD KEY' drop-down menu, then click 'Create new key'.\n6. Select key type 'JSON'.\n7. Click 'CREATE' to create and download the service account key.\n\n3. Authorize your service account in the Google Wallet console\n--------------------------------------------------------------\n\nTo authenticate your requests to the Google Wallet REST API using a service account\nkey, you must add the email address of your service account as a user to your\nIssuer account. To add your service account as a user, do the following:\n\n1. Go to the ['Service accounts'](https://console.cloud.google.com/iam-admin/serviceaccounts) page in the Google Cloud console.\n2. Copy the email address of the service account you want to use to authenticate your requests to the Google Wallet API.\n3. Go to the [Google Pay \\& Wallet console](https://pay.google.com/business/console/).\n4. In the left nav, click 'Users'.\n5. Click 'Invite a user'.\n6. Input the email address of your service account.\n7. In the 'Access level' drop-down, select 'Developer'.\n8. Click the 'Invite' button.\n\nOnce your service account is added, you can use any service account keys generated\nfor it to authenticate requests to the Google Wallet REST API. When using service\naccount keys, keep in mind that these are highly sensitive credentials that\nshould only be used in secure, server-side environments."]]