SAS Portal API와 통합할 때는 인증에 서비스 계정을 사용하는 것이 좋습니다. 필요한 경우 서비스 계정을 만듭니다. 서비스 계정 키를 만들 때 키 유형으로 JSON을 선택해야 합니다. 완료되면 서비스 계정 키가 브라우저의 기본 위치로 다운로드됩니다. 또한 서비스 계정에
'프로젝트 소유자' 역할을 부여해야 합니다.
다음으로 서비스 계정 인증을 Bearer 토큰으로 제공해야 합니다. cURL로 HTTP 요청을 하는 등 SAS Portal API를 직접 호출하는 경우 Authorization 헤더에 Bearer 토큰으로 인증을 전달합니다. 서비스 계정으로 Bearer 토큰을 가져오려면 다음 단계를 따르세요.
[null,null,["최종 업데이트: 2022-09-26(UTC)"],[[["Service accounts are the recommended authentication method for integrating with the SAS Portal API, requiring the creation of a service account with a JSON key and granting it the \"Project Owner\" role."],["Authentication to the SAS Portal API is done using a Bearer token obtained through the `gcloud` command-line tool by activating the service account and printing an access token."],["When calling the API, include the Bearer token in the `Authorization` header of your request along with the `X-Goog-User-Project` header specifying your Google Cloud Project ID."]]],["The key actions are creating a service account with a JSON key, granting it the \"Project Owner\" role, and obtaining a Bearer token for API authentication. This is done by installing the `gcloud` tool, authenticating the service account using `gcloud auth activate-service-account --key-file`, and generating an access token via `gcloud auth print-access-token`. This token should then be included in the `Authorization` header when making API calls as a Bearer token.\n"]]