পিকার API দিয়ে শুরু করুন
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
পিকার API আপনার ব্যবহারকারীদের তাদের Google ফটো লাইব্রেরি থেকে ফটো এবং ভিডিও নির্বাচন করতে এবং আপনার অ্যাপ্লিকেশনের সাথে শেয়ার করার একটি নিরাপদ উপায় প্রদান করে৷
আপনি শুরু করার আগে
পিকার API প্রবাহ
পিকার API কীভাবে কাজ করে তার একটি ওভারভিউ এখানে রয়েছে:
OAuth টোকেন পরীক্ষা করুন: পিকার API ফ্লো শুরু করার আগে, ব্যবহারকারীর জন্য একটি বৈধ OAuth 2.0 অ্যাক্সেস টোকেন পরীক্ষা করুন। যদি কোন টোকেন না থাকে, তাহলে একটি পেতে OAuth 2.0 অনুমোদনের প্রবাহ শুরু করুন ।
একটি সেশন তৈরি করুন: একটি নতুন সেশন তৈরি করতে পিকার API-এ একটি কল করে প্রক্রিয়াটি শুরু করুন৷ এই কলটি একটি অনন্য pickerUri
ফিরিয়ে দেবে।
ব্যবহারকারীদের সরাসরি Google Photos অ্যাপে পাঠান: আপনার ব্যবহারকারীদের pickerUri
ইউরি প্রদান করুন (হয় একটি ক্লিকযোগ্য লিঙ্ক বা একটি QR কোড হিসাবে)। এই URL নিরাপদে তাদের Google Photos অ্যাপ খুলবে।
ব্যবহারকারী মিডিয়া আইটেম নির্বাচন করে: Google ফটো অ্যাপের মধ্যে, ব্যবহারকারীরা তাদের লাইব্রেরি ব্রাউজ করতে পারেন এবং আপনার অ্যাপের সাথে শেয়ার করতে চান এমন ফটো এবং ভিডিও নির্বাচন করতে পারেন। ব্যবহারকারীর বাছাই করার অভিজ্ঞতার একটি ওভারভিউ পড়ুন।
সেশন পোল করুন: আপনার অ্যাপের স্থিতি পরীক্ষা করার জন্য পর্যায়ক্রমে সেশনে পোল করা উচিত। আপনি সত্যে ফিরে আসার জন্য mediaItemsSet
প্রপার্টি খুঁজছেন, ব্যবহারকারী তাদের নির্বাচন শেষ করেছে তা নির্দেশ করে।
নির্বাচিত মিডিয়া আইটেম তালিকাভুক্ত করুন: একবার mediaItemsSet
সত্য ফেরত, আপনি নির্বাচিত মিডিয়া আইটেম সম্পর্কে বিশদ বিবরণ পেতে তালিকা পদ্ধতি ব্যবহার করতে পারেন।
মিডিয়া আইটেমগুলি পুনরুদ্ধার করুন এবং ব্যবহার করুন: এখন আপনার নির্বাচিত মিডিয়া আইটেমগুলিতে অ্যাক্সেস রয়েছে৷ আপনি baseUrl
ব্যবহার করে তাদের সামগ্রী আনতে পারেন এবং আপনার অ্যাপ্লিকেশনের মধ্যে ব্যবহার করতে পারেন।
পরবর্তী পদক্ষেপ
- রেফারেন্স ডক্স পর্যালোচনা করুন: সমস্ত উপলব্ধ পদ্ধতি এবং পরামিতি সম্পর্কে জানতে বিশদ পিকার API রেফারেন্স ডকুমেন্টেশন অন্বেষণ করুন।
- নমুনাগুলি ব্যবহার করে দেখুন: পিকার API কার্যকরভাবে দেখতে এবং আপনার একীকরণের জন্য অনুপ্রেরণা পেতে আমাদের নমুনা দেখুন।
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-08-29 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-08-29 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eThe Picker API lets users securely select photos and videos from their Google Photos library and share them with your application.\u003c/p\u003e\n"],["\u003cp\u003eBefore using the Picker API, ensure it's the right fit for your use case and properly configure your app with the necessary API and authentication setup.\u003c/p\u003e\n"],["\u003cp\u003eThe Picker API flow involves creating a session, directing users to the Google Photos app for selection, polling the session for completion, and then retrieving the selected media items.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers should check the provided resources like reference documentation and samples for detailed information and implementation examples.\u003c/p\u003e\n"]]],["The Picker API enables users to share media from Google Photos with your app. First, check for and obtain an OAuth token. Then, create a new session via the Picker API, generating a `pickerUri`. Direct users to this URI to select media. Periodically poll the session until `mediaItemsSet` is true. Use the list method to retrieve details of selected items, and then access their content using `baseUrl` for use in your application.\n"],null,["# Get started with the Picker API\n\nThe Picker API provides a secure way for your users to select photos and videos\nfrom their Google Photos library and share them with your application.\n\nBefore you start\n----------------\n\n- **Check out the overview:** [Compare the Picker API and the Library API](/photos/overview/about) to make sure the Picker API is the right fit for your use case.\n- **Configure your app:** Enable the API and set up authentication. See [Configure your app](/photos/overview/configure-your-app) for detailed steps.\n\nThe Picker API flow\n-------------------\n\nHere is an overview of the how the Picker API works:\n\n1. **Check for OAuth token:** Before starting the Picker API flow, check for a\n valid OAuth 2.0 access token for the user. If there is no token, [initiate\n the OAuth 2.0 authorization flow](/identity/protocols/oauth2) to obtain one.\n\n2. **Create a session:** Initiate the process by making a call to the Picker\n API to [create a new\n session](/photos/picker/reference/rest/v1/sessions/create). This call will\n return a unique `pickerUri`.\n\n3. **Direct users to the Google Photos app:** Provide the [`pickerUri`](/photos/picker/reference/rest/v1/sessions#PickingSession.FIELDS.picker_uri)\n to your users (either as a clickable link or a QR code). This URL will\n securely open their Google Photos app.\n\n4. **User selects media items:** Within the Google Photos app, users can browse\n their library and select the photos and videos they want to share with your\n app. Read an overview of the [user's picking experience](/photos/picker/guides/picking-experience).\n\n5. **Poll the session:** Your app should periodically [poll the session](/photos/picker/reference/rest/v1/sessions/get)\n to check the status. You're looking for the\n [`mediaItemsSet`](/photos/picker/reference/rest/v1/sessions#PickingSession.FIELDS.media_items_set)\n property to return true, indicating the user has finished their selection.\n\n | **Note:** Every time you poll a session the response contains [recommended\n | intervals and\n | timeouts](/photos/picker/reference/rest/v1/sessions#PollingConfig) to configure your polling.\n6. **List selected media items:** Once `mediaItemsSet` returns true, you can\n use [the list method](/photos/picker/reference/rest/v1/mediaItems/list) to\n get details about the selected media items.\n\n7. **Retrieve and use media items:** Now you have access to the selected media\n items. You can [fetch their\n content](/photos/picker/guides/media-items#retrieve-picked-media-items)\n using the\n [`baseUrl`](/photos/picker/reference/rest/v1/mediaItems#MediaFile.FIELDS.base_url)\n and utilize them within your application.\n\nNext steps\n----------\n\n- Review the reference docs: Explore the detailed [Picker API reference\n documentation](/photos/picker/reference/rest) to learn about all the available methods and parameters.\n- Try out the samples: Check out our [sample](/photos/picker/samples) to see the Picker API in action and get inspiration for your integration."]]