bookmark_borderbookmark
Stay organized with collections
Save and categorize content based on your preferences.
We strongly recommend that you use a service account for authentication when you integrate with
the SAS Portal API. If necessary,
create a service account. Be sure to select JSON as your key type when you
create your service account key. Once complete, your service account key is downloaded to your
browser's default location. Furthermore, be sure to
grant the "Project Owner" role to the service account.
Next, you need to provide your service account authentication as a Bearer token. If you call the
SAS Portal API directly, such as by making an HTTP request with cURL, you pass your
authentication as a Bearer token in an Authorization header. To obtain a Bearer token
with your service account, follow these steps:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-12-05 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"]]