ننصحك بشدة باستخدام حساب خدمة للمصادقة عند الدمج مع
واجهة برمجة تطبيقات بوابة SAS Portal. إذا لزم الأمر، يمكنك إنشاء حساب خدمة. احرِص على اختيار JSON كنوع المفتاح عند إنشاء مفتاح حساب الخدمة. بعد الانتهاء، يتم تنزيل مفتاح حساب الخدمة إلى
الموقع التلقائي للمتصفِّح. بالإضافة إلى ذلك، تأكّد من
منح الدور &"مالك المشروع" لحساب الخدمة.
بعد ذلك، عليك تقديم مصادقة حساب الخدمة كرمز مميَّز للحامل المميز. إذا كنت تطلب
واجهة برمجة تطبيقات بوابة SAS مباشرةً، مثل تقديم طلب HTTP باستخدام cURL، يمكنك تمرير
المصادقة على أنها رمز مميز للحامل في عنوان Authorization. للحصول على رمز حامل مميّز
من خلال حسابك على الخدمة، اتّبِع الخطوات التالية:
تاريخ التعديل الأخير: 2022-09-26 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2022-09-26 (حسب التوقيت العالمي المتفَّق عليه)"],[[["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"]]