অনুমোদন এবং প্রমাণীকরণ
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
আমরা দৃঢ়ভাবে সুপারিশ করি যে আপনি যখন SAS পোর্টাল API-এর সাথে একীভূত হন তখন প্রমাণীকরণের জন্য একটি পরিষেবা অ্যাকাউন্ট ব্যবহার করুন। প্রয়োজনে, একটি পরিষেবা অ্যাকাউন্ট তৈরি করুন । আপনি যখন আপনার পরিষেবা অ্যাকাউন্ট কী তৈরি করবেন তখন আপনার কী প্রকার হিসাবে JSON নির্বাচন করতে ভুলবেন না। একবার সম্পূর্ণ হয়ে গেলে, আপনার পরিষেবা অ্যাকাউন্ট কী আপনার ব্রাউজারের ডিফল্ট অবস্থানে ডাউনলোড করা হয়। উপরন্তু, পরিষেবা অ্যাকাউন্টে "প্রকল্প মালিক" ভূমিকা প্রদান করতে ভুলবেন না।
এর পরে, আপনাকে বিয়ারার টোকেন হিসাবে আপনার পরিষেবা অ্যাকাউন্ট প্রমাণীকরণ প্রদান করতে হবে। আপনি যদি সরাসরি SAS পোর্টাল API-কে কল করেন, যেমন cURL
এর সাথে একটি HTTP অনুরোধ করে, আপনি একটি Authorization
শিরোনামে একটি বহনকারী টোকেন হিসাবে আপনার প্রমাণীকরণটি পাস করেন। আপনার পরিষেবা অ্যাকাউন্টের সাথে একটি বিয়ারার টোকেন পেতে, এই পদক্ষেপগুলি অনুসরণ করুন:
-
gcloud
কমান্ড লাইন টুল ইনস্টল করুন । আপনার পরিষেবা অ্যাকাউন্টে প্রমাণীকরণ করুন। নিম্নলিখিত কমান্ডে, আপনার পরিষেবা অ্যাকাউন্ট কী ফাইলের পাথ দিয়ে ${KEY_FILE} প্রতিস্থাপন করুন:
gcloud auth activate-service-account --key-file ${KEY_FILE}
একটি অনুমোদন টোকেন পেতে আপনার পরিষেবা অ্যাকাউন্ট ব্যবহার করুন:
gcloud auth print-access-token
কমান্ড একটি অ্যাক্সেস টোকেন মান প্রদান করে।
আপনি যখন API ব্যবহার করেন, তখন একটি Authorization
শিরোনামে একটি বহনকারী টোকেন হিসাবে টোকেন মান পাস করুন। নিম্নলিখিত উদাহরণ দেখুন:
curl -X GET -H "X-Goog-User-Project: ${CLIENT_PROJECT}" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${TOKEN}" \
"https://sasportal.googleapis.com/v1alpha1/customers"
Google ক্লাউড প্রকল্পের আইডিতে ${CLIENT_PROJECT} সেট করুন যেখান থেকে আপনি অনুরোধ করবেন এবং তারপরে অনুমোদন টোকেনে ${TOKEN} সেট করুন।
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-25 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-25 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eService 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.\u003c/p\u003e\n"],["\u003cp\u003eAuthentication to the SAS Portal API is done using a Bearer token obtained through the \u003ccode\u003egcloud\u003c/code\u003e command-line tool by activating the service account and printing an access token.\u003c/p\u003e\n"],["\u003cp\u003eWhen calling the API, include the Bearer token in the \u003ccode\u003eAuthorization\u003c/code\u003e header of your request along with the \u003ccode\u003eX-Goog-User-Project\u003c/code\u003e header specifying your Google Cloud Project ID.\u003c/p\u003e\n"]]],["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"],null,["# Authorization and authentication\n\nWe strongly recommend that you use a service account for authentication when you integrate with\nthe SAS Portal API. If necessary, [create a service account](https://cloud.google.com/iam/docs/creating-managing-service-accounts#creating_a_service_account). Be sure to select JSON as your key type when you [create your service account key](https://cloud.google.com/iam/docs/creating-managing-service-account-keys#creating_service_account_keys). Once complete, your service account key is downloaded to your\nbrowser's default location. Furthermore, be sure to [grant the \"Project Owner\" role](https://cloud.google.com/iam/docs/granting-changing-revoking-access) to the service account.\n\nNext, you need to provide your service account authentication as a Bearer token. If you call the\nSAS Portal API directly, such as by making an HTTP request with `cURL`, you pass your\nauthentication as a Bearer token in an `Authorization` header. To obtain a Bearer token\nwith your service account, follow these steps:\n\n1. [Install the `gcloud` command line tool](https://cloud.google.com/sdk/install).\n2. Authenticate to your service account. In the following command, replace\n \u003cvar translate=\"no\"\u003e${KEY_FILE}\u003c/var\u003e with the path to your service account key file:\n\n ```genshi\n gcloud auth activate-service-account --key-file ${KEY_FILE}\n ```\n3. Use your service account to obtain an authorization token:\n\n ```text\n gcloud auth print-access-token\n ```\n\n The command returns an access token value.\n4. When you use the API, pass the token value as a Bearer token in an `Authorization`\n header. See the following example:\n\n ```genshi\n curl -X GET -H \"X-Goog-User-Project: ${CLIENT_PROJECT}\" \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer ${TOKEN}\" \\\n \"https://sasportal.googleapis.com/v1alpha1/customers\"\n ```\n\n Set \u003cvar translate=\"no\"\u003e${CLIENT_PROJECT}\u003c/var\u003e to the\n [ID of the Google Cloud Project](https://cloud.google.com/resource-manager/docs/creating-managing-projects) from which you make the requests, and then set\n \u003cvar translate=\"no\"\u003e${TOKEN}\u003c/var\u003e to the authorization token."]]