Google পরিষেবাগুলির জন্য অনুমোদন৷

বিল্ট-ইন গুগল পরিষেবা বা উন্নত গুগল পরিষেবা থেকে ব্যক্তিগত ডেটা অ্যাক্সেস করার জন্য অ্যাপস স্ক্রিপ্টের ব্যবহারকারীর অনুমোদন প্রয়োজন।

গুগল পরিষেবার জন্য অনুমোদন কীভাবে কাজ করে

যখন কোনও স্ক্রিপ্টের Google পরিষেবাগুলিতে অ্যাক্সেসের প্রয়োজন হয়, তখন এটি এই সাধারণ প্রক্রিয়াটি অনুসরণ করে:

  1. সনাক্তকরণ : অ্যাপস স্ক্রিপ্ট স্ক্রিপ্টটি স্ক্যান করে কোন পরিষেবাগুলি ব্যবহার করে তা সনাক্ত করে (উদাহরণস্বরূপ, SpreadsheetApp বা GmailApp )।
  2. স্কোপ নির্ধারণ : স্ক্যানের উপর ভিত্তি করে, অ্যাপস স্ক্রিপ্ট স্ক্রিপ্টটি চালানোর জন্য প্রয়োজনীয় OAuth স্কোপের একটি সেট সনাক্ত করে।
  3. অনুমোদন পরীক্ষা : যখন স্ক্রিপ্টটি চালানো হয়, তখন এটি পরীক্ষা করে যে ব্যবহারকারী ইতিমধ্যেই সেই স্কোপগুলিকে অনুমোদন করেছেন কিনা।
  4. ব্যবহারকারীর প্রম্পট : যদি অনুমোদন অনুপস্থিত থাকে, তাহলে ব্যবহারকারীকে অনুমতি দেওয়ার জন্য একটি ডায়ালগ প্রদর্শিত হবে।
  5. এক্সিকিউশন : স্ক্রিপ্টটি অনুমোদিত হওয়ার পরে, এটি সেই ব্যবহারকারীর জন্য অনুরোধ করা ডেটা অ্যাক্সেস করতে পারে।

অনুমতি এবং স্ক্রিপ্টের প্রকারভেদ

একটি স্ক্রিপ্ট যে ব্যবহারকারীর পরিচয় দিয়ে চলে — এবং এর ফলে এটি যে ডেটা অ্যাক্সেস করতে পারে — তা স্ক্রিপ্টটি কোন পরিস্থিতিতে চালানো হচ্ছে তার উপর নির্ভর করে পরিবর্তিত হয়, যেমনটি নিম্নলিখিত সারণীতে দেখানো হয়েছে।

স্ক্রিপ্টের ধরণ স্ক্রিপ্টটি এভাবে চলে...
স্বতন্ত্র , অ্যাড-অন , অথবা ডক্স, শিট, স্লাইড, অথবা ফর্মের সাথে আবদ্ধ User at the keyboard
একটি স্প্রেডশিটে কাস্টম ফাংশন বেনামী ব্যবহারকারী ; তবে, কীবোর্ডে ব্যবহারকারীর উপর কোটার সীমা গণনা করা হয়।
ওয়েব অ্যাপ অথবা গুগল সাইটস গ্যাজেট অ্যাপ স্থাপনের সময় নির্বাচিত বিকল্পগুলির উপর নির্ভর করে কীবোর্ড বা স্ক্রিপ্ট মালিকের ব্যবহারকারী
ইনস্টলযোগ্য ট্রিগার ট্রিগার তৈরিকারী ব্যবহারকারী

অ্যাক্সেসের অধিকার দিন

Apps Script determines the authorization scopes (like access your Google Sheets files or Gmail) automatically, based on a scan of the code. Code that is commented out can still generate an authorization request. If a script needs authorization, you'll see one of the authorization dialogs shown here when it is run.

Scripts that you have previously authorized also ask for additional authorization if a code change adds new services. Scripts may not request authorization if you access the script as a web app that runs under the script owner's user identity .

অ্যাক্সেস অধিকার প্রত্যাহার করুন

আপনার ডেটাতে স্ক্রিপ্টের অ্যাক্সেস প্রত্যাহার করতে, এই পদক্ষেপগুলি অনুসরণ করুন:

  1. Visit the permissions page for your Google Account . (To navigate to this page in the future, visit Google.com , then click your account picture in the top-right corner of the screen. Next, click My Account , then Connected apps & sites under the "Sign-in & security" section, and then Manage Apps .)
  2. আপনি যে স্ক্রিপ্টের অনুমোদন প্রত্যাহার করতে চান তার নামের উপর ক্লিক করুন, তারপর ডানদিকে Remove- এ ক্লিক করুন, তারপর ফলাফলের ডায়ালগে OK- তে ক্লিক করুন।

বর্তমান ডকুমেন্টের মধ্যে সুযোগ সীমিত করুন

If you're building an add-on or other script that uses the Spreadsheet service , Document service , Slides service , or Forms service , you can force the authorization dialog to ask only for access to files in which the add-on or script is used, rather than all of a user's spreadsheets, documents, or forms. To do so, include the following JsDoc annotation in a file-level comment:

/**
 * @OnlyCurrentDoc
 */

An opposing annotation, @NotOnlyCurrentDoc , is available if your script includes a library that declares @OnlyCurrentDoc , but the main script actually requires access to more than the current file.

অ্যাড-অনের জন্য অনুমোদনের জীবনচক্র

Add-ons for Google Sheets, Docs, Slides, and Forms generally follow the same authorization model as scripts that are bound to a document. In certain circumstances, however, their onOpen(e) and onEdit(e) functions run in a no-authorization mode that presents some additional complications. For more information, see the guide to the add-ons authorization lifecycle .

OAuth অ্যাপ্লিকেশন ব্যবহারকারীর সীমা

যেসব অ্যাপ্লিকেশন OAuth ব্যবহার করে Google ব্যবহারকারীর ডেটা অ্যাক্সেস করে, যার মধ্যে রয়েছে Apps Script প্রকল্প, তাদের অনুমোদনের সীমা প্রযোজ্য। বিস্তারিত জানার জন্য OAuth অ্যাপ্লিকেশন ব্যবহারকারীর সীমা দেখুন।

অ্যাপস স্ক্রিপ্টের সাথে পুনঃপ্রমাণীকরণ আচরণ

আপনার Google ক্লাউড পরিষেবা সেটিংসে কনফিগার করা পুনঃপ্রমাণীকরণ ফ্রিকোয়েন্সি অ্যাপস স্ক্রিপ্ট প্রয়োগ করে না। এর কারণ হল অ্যাপস স্ক্রিপ্ট ট্রিগার ব্যবহার করে স্বয়ংক্রিয়ভাবে চলতে পারে, যা সরাসরি ব্যবহারকারীর ইন্টারঅ্যাকশন ছাড়াই কাজ করে। এই স্বয়ংক্রিয় এক্সিকিউশনগুলি পুনঃপ্রমাণীকরণ প্রম্পটগুলিকে ট্রিগার করে না। আপনার নির্দিষ্ট সময়কালের পরে (উদাহরণস্বরূপ, 12 ঘন্টা) আপনার অ্যাপস স্ক্রিপ্ট অ্যাপ্লিকেশনটি স্বয়ংক্রিয়ভাবে আপনাকে পুনঃপ্রমাণীকরণ করতে বলবে না।

ম্যানিফেস্টে স্পষ্ট স্কোপ সেট করুন

Apps Script automatically determines required scopes by scanning the code for function calls. If you need more control, you can explicitly set the scopes in the project manifest ( appsscript.json ). This is recommended for published scripts, to ensure that you're using the minimum required permissions.

নির্দেশাবলীর জন্য, স্পষ্ট স্কোপ সেট করুন দেখুন।

সমস্যা সমাধান

  • "Authorization required" error when running a trigger : Triggers must be authorized by the user who created them. If you add code that requires new permissions, you must manually run a function in the script editor once to trigger the authorization dialog.
  • Scopes not updating : If you've updated your code but the authorization dialog doesn't reflect the changes, try saving the project and refreshing the editor. If you are using explicit scopes in the manifest, ensure you've added the new scope to the oauthScopes array.
  • "এই অ্যাপটি ব্লক করা হয়েছে" অথবা যাচাই না করা অ্যাপ সতর্কতা : এটি তখন ঘটে যখন আপনার স্ক্রিপ্ট সংবেদনশীল বা সীমাবদ্ধ স্কোপ ব্যবহার করে এবং Google দ্বারা যাচাই করা না হয়। OAuth ক্লায়েন্ট যাচাইকরণ দেখুন।