গুগল ক্লাসরুম অ্যাড-অনগুলি এখন সাধারণত বিকাশকারীদের জন্য উপলব্ধ! আরও তথ্যের জন্য
অ্যাড-অন ডকুমেন্টেশন দেখুন.
Method: courses.announcements.addOnAttachments.create
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
একটি পোস্টের অধীনে একটি অ্যাড-অন সংযুক্তি তৈরি করে।
পোস্টে নতুন সংযুক্তি তৈরি করার জন্য অ্যাড-অনের অনুমতি প্রয়োজন।
এই পদ্ধতি নিম্নলিখিত ত্রুটি কোড প্রদান করে:
- অ্যাক্সেস ত্রুটির জন্য
PERMISSION_DENIED
। - অনুরোধটি ত্রুটিপূর্ণ হলে
INVALID_ARGUMENT
৷ -
NOT_FOUND
যদি চিহ্নিত সম্পদগুলির মধ্যে একটি বিদ্যমান না থাকে।
HTTP অনুরোধ
POST https://classroom.googleapis.com/v1/courses/{courseId}/announcements/{itemId}/addOnAttachments
URL gRPC ট্রান্সকোডিং সিনট্যাক্স ব্যবহার করে।
পাথ প্যারামিটার
পরামিতি |
---|
courseId | string প্রয়োজন। কোর্সের শনাক্তকারী। |
itemId | string Announcement শনাক্তকারী , CourseWork , বা CourseWorkMaterial যার অধীনে সংযুক্তি তৈরি করতে হবে৷ এই ক্ষেত্রটি প্রয়োজনীয়, কিন্তু আমরা পোস্টআইডি থেকে স্থানান্তরিত করার সময় এটিকে চিহ্নিত করা হয় না। |
ক্যোয়ারী প্যারামিটার
পরামিতি |
---|
postId (deprecated) | string ঐচ্ছিক। অপ্রচলিত, পরিবর্তে itemId ব্যবহার করুন। |
addOnToken | string ঐচ্ছিক। টোকেন যা অনুরোধ অনুমোদন করে। যখন ব্যবহারকারীকে ক্লাসরুম থেকে অ্যাড-অনের URL-এ পুনঃনির্দেশিত করা হয় তখন টোকেনটি একটি ক্যোয়ারী প্যারামিটার হিসাবে পাস করা হয়। এই অনুমোদন টোকেনটি ক্লাসরুমে সংযুক্তি তৈরির জন্য প্রয়োজন কিন্তু অংশীদার-প্রথম সংযুক্তি তৈরির জন্য ঐচ্ছিক৷ অংশীদার-প্রথম সংযুক্তি তৈরির জন্য প্রদান না করা হলে একটি ত্রুটি প্রদান করে এবং যে বিকাশকারী প্রকল্পগুলি সংযুক্তি তৈরি করেছে এবং এর মূল স্ট্রিম আইটেম মেলে না। |
শরীরের অনুরোধ
অনুরোধের অংশে AddOnAttachment
এর একটি উদাহরণ রয়েছে।
প্রতিক্রিয়া শরীর
সফল হলে, প্রতিক্রিয়া বডিতে AddOnAttachment
এর একটি নতুন তৈরি উদাহরণ থাকে।
অনুমোদনের সুযোগ
নিম্নলিখিত OAuth সুযোগ প্রয়োজন:
-
https://www.googleapis.com/auth/classroom.addons.teacher
আরও তথ্যের জন্য, অনুমোদন নির্দেশিকা দেখুন।
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-25 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-25 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# Method: courses.announcements.addOnAttachments.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\nCreates an add-on attachment under a post.\n\nRequires the add-on to have permission to create new attachments on the post.\n\nThis method returns the following error codes:\n\n- `PERMISSION_DENIED` for [access errors](/workspace/classroom/reference/Access.Errors).\n- `INVALID_ARGUMENT` if the request is malformed.\n- `NOT_FOUND` if one of the identified resources does not exist.\n\n### HTTP request\n\n`POST https://classroom.googleapis.com/v1/courses/{courseId}/announcements/{itemId}/addOnAttachments`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `courseId` | `string` Required. Identifier of the course. |\n| `itemId` | `string` Identifier of the `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which to create the attachment. This field is required, but is not marked as such while we are migrating from postId. |\n\n### Query parameters\n\n| Parameters ||\n|---------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `postId` **(deprecated)** | `string` Optional. Deprecated, use `itemId` instead. |\n| `addOnToken` | `string` Optional. Token that authorizes the request. The token is passed as a query parameter when the user is redirected from Classroom to the add-on's URL. This authorization token is required for in-Classroom attachment creation but optional for partner-first attachment creation. Returns an error if not provided for partner-first attachment creation and the developer projects that created the attachment and its parent stream item do not match. |\n\n### Request body\n\nThe request body contains an instance of [AddOnAttachment](/workspace/classroom/reference/rest/v1/courses.announcements.addOnAttachments#AddOnAttachment).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [AddOnAttachment](/workspace/classroom/reference/rest/v1/courses.announcements.addOnAttachments#AddOnAttachment).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/classroom.addons.teacher`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]