Method: permissions.create
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
একটি ফাইল বা শেয়ার্ড ড্রাইভের জন্য একটি অনুমতি তৈরি করে।
সতর্কতা: একই ফাইলে সমকালীন অনুমতি ক্রিয়াকলাপ সমর্থিত নয়; শুধুমাত্র শেষ আপডেট প্রয়োগ করা হয়.
HTTP অনুরোধ
POST https://www.googleapis.com/drive/v3/files/{fileId}/permissions
URL gRPC ট্রান্সকোডিং সিনট্যাক্স ব্যবহার করে।
পাথ প্যারামিটার
পরামিতি |
---|
fileId | string ফাইল বা শেয়ার্ড ড্রাইভের আইডি। |
ক্যোয়ারী প্যারামিটার
পরামিতি |
---|
emailMessage | string বিজ্ঞপ্তি ইমেলে অন্তর্ভুক্ত করার জন্য একটি সাধারণ পাঠ্য কাস্টম বার্তা৷ |
enforceSingleParent (deprecated) | boolean অপ্রচলিত: বিস্তারিত জানার জন্য moveToNewOwnersRoot দেখুন। |
moveToNewOwnersRoot | boolean এই প্যারামিটারটি শুধুমাত্র তখনই কার্যকর হবে যদি আইটেমটি শেয়ার্ড ড্রাইভে না থাকে এবং অনুরোধটি আইটেমের মালিকানা হস্তান্তর করার চেষ্টা করে। true সেট করা থাকলে, আইটেমটি নতুন মালিকের আমার ড্রাইভ রুট ফোল্ডারে সরানো হবে এবং সমস্ত পূর্ববর্তী অভিভাবকদের সরিয়ে দেওয়া হবে৷ false সেট করা হলে, পিতামাতা পরিবর্তন করা হয় না। |
sendNotificationEmail | boolean ব্যবহারকারী বা গোষ্ঠীতে ভাগ করার সময় একটি বিজ্ঞপ্তি ইমেল পাঠাতে হবে কিনা। এটি ডিফল্ট ব্যবহারকারী এবং গোষ্ঠীর জন্য true , এবং অন্যান্য অনুরোধের জন্য অনুমোদিত নয়। মালিকানা স্থানান্তরের জন্য এটি অক্ষম করা উচিত নয়। |
supportsAllDrives | boolean অনুরোধ করা অ্যাপ্লিকেশনটি আমার ড্রাইভ এবং শেয়ার্ড ড্রাইভ উভয়কেই সমর্থন করে কিনা৷ |
supportsTeamDrives (deprecated) | boolean বাতিল করা হয়েছে: পরিবর্তে supportsAllDrives ব্যবহার করুন। |
transferOwnership | boolean নির্দিষ্ট ব্যবহারকারীর কাছে মালিকানা হস্তান্তর করতে হবে এবং বর্তমান মালিককে একজন লেখকের কাছে ডাউনগ্রেড করতে হবে কিনা। এই পরামিতি পার্শ্ব প্রতিক্রিয়া একটি স্বীকৃতি হিসাবে প্রয়োজন. |
useDomainAdminAccess | boolean একটি ডোমেন প্রশাসক হিসাবে অনুরোধ ইস্যু করুন; যদি সত্যে সেট করা হয়, তাহলে অনুরোধকারীকে অ্যাক্সেস দেওয়া হবে যদি ফাইল আইডি প্যারামিটারটি একটি শেয়ার্ড ড্রাইভকে নির্দেশ করে এবং অনুরোধকারী সেই ডোমেনের একজন প্রশাসক হয় যার সাথে শেয়ার্ড ড্রাইভটি অন্তর্গত। |
enforceExpansiveAccess | boolean অনুরোধটি বিস্তৃত অ্যাক্সেসের নিয়মগুলি প্রয়োগ করবে কিনা৷ |
শরীরের অনুরোধ
অনুরোধের অংশে Permission
একটি উদাহরণ রয়েছে।
প্রতিক্রিয়া শরীর
সফল হলে, প্রতিক্রিয়া বডিতে Permission
একটি নতুন তৈরি উদাহরণ থাকে।
অনুমোদনের সুযোগ
নিম্নলিখিত OAuth সুযোগগুলির মধ্যে একটি প্রয়োজন:
-
https://www.googleapis.com/auth/drive
-
https://www.googleapis.com/auth/drive.file
কিছু সুযোগ সীমাবদ্ধ এবং সেগুলি ব্যবহার করার জন্য আপনার অ্যাপের নিরাপত্তা মূল্যায়ন প্রয়োজন। আরও তথ্যের জন্য, অনুমোদন নির্দেশিকা দেখুন।
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-08-26 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-08-26 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# Method: permissions.create\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nCreates a permission for a file or shared drive.\n\n**Warning:** Concurrent permissions operations on the same file are not supported; only the last update is applied.\n\n### HTTP request\n\n`POST https://www.googleapis.com/drive/v3/files/{fileId}/permissions`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|----------------------------------------------|\n| `fileId` | `string` The ID of the file or shared drive. |\n\n### Query parameters\n\n| Parameters ||\n|----------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `emailMessage` | `string` A plain text custom message to include in the notification email. |\n| `enforceSingleParent` **(deprecated)** | `boolean` Deprecated: See `moveToNewOwnersRoot` for details. |\n| `moveToNewOwnersRoot` | `boolean` This parameter will only take effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. If set to `true`, the item will be moved to the new owner's My Drive root folder and all prior parents removed. If set to `false`, parents are not changed. |\n| `sendNotificationEmail` | `boolean` Whether to send a notification email when sharing to users or groups. This defaults to true for users and groups, and is not allowed for other requests. It must not be disabled for ownership transfers. |\n| `supportsAllDrives` | `boolean` Whether the requesting application supports both My Drives and shared drives. |\n| `supportsTeamDrives` **(deprecated)** | `boolean` Deprecated: Use `supportsAllDrives` instead. |\n| `transferOwnership` | `boolean` Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect. |\n| `useDomainAdminAccess` | `boolean` Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. |\n| `enforceExpansiveAccess` | `boolean` Whether the request should enforce expansive access rules. |\n\n### Request body\n\nThe request body contains an instance of [Permission](/workspace/drive/api/reference/rest/v3/permissions#Permission).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [Permission](/workspace/drive/api/reference/rest/v3/permissions#Permission).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/drive`\n- `\n https://www.googleapis.com/auth/drive.file`\n\nSome scopes are restricted and require a security assessment for your app to use them. For more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]