সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
অনুমোদন তথ্য
একটি বস্তু যা ব্যবহারকারী স্ক্রিপ্টের প্রয়োজনীয় স্কোপের জন্য অনুমোদন দিয়েছে কিনা তা পরীক্ষা করে। বস্তুটি ব্যবহারকারীদের অনুমতি দেওয়ার জন্য একটি অনুমোদন URL প্রদান করে।
কিছু স্ক্রিপ্ট এক্সিকিউশন স্ক্রিপ্ট দ্বারা ব্যবহৃত সমস্ত প্রয়োজনীয় সুযোগে ব্যবহারকারীর সম্মতি ছাড়াই শুরু হতে পারে। এই অবজেক্টের তথ্য আপনাকে কোডের বিভাগগুলিতে অ্যাক্সেস নিয়ন্ত্রণ করতে দেয় যার জন্য নির্দিষ্ট স্কোপের প্রয়োজন হয় এবং পরবর্তী কার্যকর করার জন্য সেই স্কোপের অনুমোদনের অনুরোধ করা হয়।
এই বস্তুটি Script App.getAuthorizationInfo(authMode) দ্বারা ফেরত দেওয়া হয়। প্রায় সব ক্ষেত্রে, স্ক্রিপ্টগুলিকে Script App.getAuthorizationInfo(ScriptApp.AuthMode.FULL) কল করা উচিত, যেহেতু অন্য কোনও অনুমোদনের মোডের প্রয়োজন নেই যে ব্যবহারকারীদের অনুমোদন দেওয়া হবে৷
এমন একটি মান পায় যা নির্দেশ করে যে ব্যবহারকারীকে এক বা একাধিক পরিষেবা ব্যবহার করার জন্য এই স্ক্রিপ্টটি অনুমোদন করতে হবে কিনা (উদাহরণস্বরূপ, Script App.AuthorizationStatus.REQUIRED )।
স্ক্রিপ্টের জন্য অনুমোদিত সুযোগের একটি তালিকা পায়।
বিস্তারিত ডকুমেন্টেশন
get Authorization Status()
এমন একটি মান পায় যা নির্দেশ করে যে ব্যবহারকারীকে এক বা একাধিক পরিষেবা ব্যবহার করার জন্য এই স্ক্রিপ্টটি অনুমোদন করতে হবে কিনা (উদাহরণস্বরূপ, Script App.AuthorizationStatus.REQUIRED )।
// Log the authorization status (REQUIRED or NOT_REQUIRED).constauthInfo=ScriptApp.getAuthorizationInfo(ScriptApp.AuthMode.FULL);Logger.log(authInfo.getAuthorizationStatus());
অনুমোদনের URL পায় যা স্ক্রিপ্টে অ্যাক্সেস দেওয়ার জন্য ব্যবহার করা যেতে পারে। কোনো অনুমোদনের প্রয়োজন না হলে এই পদ্ধতিটি null প্রদান করে। ইউআরএলে থাকা পৃষ্ঠাটি স্বয়ংক্রিয়ভাবে বন্ধ হয়ে যাবে যদি এটি অ্যাক্সেস করা হয় এবং স্ক্রিপ্টটির কোনো অনুমোদনের প্রয়োজন হয় না।
// Log the URL used to grant access to the script.constauthInfo=ScriptApp.getAuthorizationInfo(ScriptApp.AuthMode.FULL);Logger.log(authInfo.getAuthorizationUrl());
প্রত্যাবর্তন
String — একটি URL যা স্ক্রিপ্ট অনুমোদন করতে ব্যবহার করা যেতে পারে
get Authorized Scopes()
স্ক্রিপ্টের জন্য অনুমোদিত সুযোগের একটি তালিকা পায়। স্কোপের একটি নির্দিষ্ট তালিকার জন্য অনুমোদনের তথ্য অনুরোধ করা হলে, নির্দিষ্ট তালিকা থেকে অনুমোদিত স্কোপগুলি ফেরত দেয়।
// Logs which scopes in the specified list have been authorized for the script.constauthInfo=ScriptApp.getAuthorizationInfo(ScriptApp.AuthMode.FULL,['https: //www.googleapis.com/auth/documents','https: //www.googleapis.com/auth/spreadsheets',]);Logger.log(authInfo.getAuthorizedScopes());
[[["সহজে বোঝা যায়","easyToUnderstand","thumb-up"],["আমার সমস্যার সমাধান হয়েছে","solvedMyProblem","thumb-up"],["অন্যান্য","otherUp","thumb-up"]],[["এতে আমার প্রয়োজনীয় তথ্য নেই","missingTheInformationINeed","thumb-down"],["খুব জটিল / অনেক ধাপ","tooComplicatedTooManySteps","thumb-down"],["পুরনো","outOfDate","thumb-down"],["অনুবাদ সংক্রান্ত সমস্যা","translationIssue","thumb-down"],["নমুনা / কোড সংক্রান্ত সমস্যা","samplesCodeIssue","thumb-down"],["অন্যান্য","otherDown","thumb-down"]],["2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eAuthorizationInfo is an object used to determine if a user needs to authorize a script to use services and provides the authorization dialog URL.\u003c/p\u003e\n"],["\u003cp\u003eThis object is primarily used in add-ons with installable triggers to manage user access or prompt for authorization.\u003c/p\u003e\n"],["\u003cp\u003eIt offers two methods: \u003ccode\u003egetAuthorizationStatus()\u003c/code\u003e to check if authorization is required, and \u003ccode\u003egetAuthorizationUrl()\u003c/code\u003e to obtain the authorization URL.\u003c/p\u003e\n"],["\u003cp\u003eScripts should generally use \u003ccode\u003eScriptApp.getAuthorizationInfo(ScriptApp.AuthMode.FULL)\u003c/code\u003e for comprehensive authorization checks.\u003c/p\u003e\n"]]],[],null,["AuthorizationInfo\n\nAn object that checks if the user has granted authorization for the required scopes of the\nscript. The object also provides an authorization URL for users to grant those permissions.\n\nSome script executions can start without a user's consent to all required scopes used by the\nscript. The information in this object lets you control access to sections of code that require\ncertain scopes and request authorization of those scopes for subsequent executions.\n\nThis object is returned by [ScriptApp.getAuthorizationInfo(authMode)](/apps-script/reference/script/script-app#getAuthorizationInfo(AuthMode)). In almost\nall cases, scripts should call `Script``App.getAuthorizationInfo(ScriptApp.AuthMode.FULL)`,\nsince no other authorization mode requires that users grant authorization. \n\nMethods\n\n| Method | Return type | Brief description |\n|-------------------------------------------------------|---------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [getAuthorizationStatus()](#getAuthorizationStatus()) | [AuthorizationStatus](/apps-script/reference/script/authorization-status) | Gets a value that indicates whether the user needs to authorize this script to use one or more services (for example, `Script``App.AuthorizationStatus.REQUIRED`). |\n| [getAuthorizationUrl()](#getAuthorizationUrl()) | `String` | Gets the authorization URL that can be used to grant access to the script. |\n| [getAuthorizedScopes()](#getAuthorizedScopes()) | `String[]` | Gets a list of authorized scopes for the script. |\n\nDetailed documentation \n\n`get``Authorization``Status()` \nGets a value that indicates whether the user needs to authorize this script to use one or more\nservices (for example, `Script``App.AuthorizationStatus.REQUIRED`).\n\n```javascript\n// Log the authorization status (REQUIRED or NOT_REQUIRED).\nconst authInfo = ScriptApp.getAuthorizationInfo(ScriptApp.AuthMode.FULL);\nLogger.log(authInfo.getAuthorizationStatus());\n```\n\nReturn\n\n\n[AuthorizationStatus](/apps-script/reference/script/authorization-status) --- the authorization status\n\n*** ** * ** ***\n\n`get``Authorization``Url()` \nGets the authorization URL that can be used to grant access to the script. This method returns\n`null` if no authorization is required. The page at the URL will close automatically if\nit is accessed and the script does not require any authorization.\n\n```javascript\n// Log the URL used to grant access to the script.\nconst authInfo = ScriptApp.getAuthorizationInfo(ScriptApp.AuthMode.FULL);\nLogger.log(authInfo.getAuthorizationUrl());\n```\n\nReturn\n\n\n`String` --- a URL that can be used to authorize the script\n\n*** ** * ** ***\n\n`get``Authorized``Scopes()` \nGets a list of authorized scopes for the script. If authorization information is requested for\na specified list of scopes, returns the authorized scopes from the specified list.\n\n```javascript\n// Logs which scopes in the specified list have been authorized for the script.\nconst authInfo = ScriptApp.getAuthorizationInfo(ScriptApp.AuthMode.FULL, [\n 'https: //www.googleapis.com/auth/documents',\n 'https: //www.googleapis.com/auth/spreadsheets',\n]);\nLogger.log(authInfo.getAuthorizedScopes());\n```\n\nReturn\n\n\n`String[]` --- The list of authorized scopes."]]