ইনস্ট্যান্স আইডি API
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
ইনস্ট্যান্স আইডি এপিআই আপনাকে আপনার অ্যান্ড্রয়েড বা আইওএস অ্যাপের সাথে ইনস্ট্যান্স আইডি সংহত করতে দেয়। ইনস্ট্যান্স আইডি আপনার অ্যাপের প্রতিটি ইন্সট্যান্সের জন্য একটি অনন্য শনাক্তকারী এবং ক্রিয়াগুলিকে প্রমাণীকরণ এবং অনুমোদন করার জন্য একটি পদ্ধতি প্রদান করে। InstanceID
দীর্ঘজীবী, কিন্তু নিম্নলিখিত কারণে মেয়াদ শেষ হতে পারে:
- ডিভাইস ফ্যাক্টরি রিসেট।
- ব্যবহারকারী অ্যাপটি আনইনস্টল করে।
- ব্যবহারকারী অ্যাপটিতে "ক্লিয়ার ডেটা" সম্পাদন করে।
- একটি বর্ধিত সময়ের জন্য অব্যবহৃত ডিভাইস (ডিভাইস এবং অঞ্চল সময়কাল নির্ধারণ করে)।
- ইনস্ট্যান্স আইডি পরিষেবা অপব্যবহার বা ত্রুটি সনাক্ত করে এবং
InstanceID
পুনরায় সেট করে। - আপনার ক্লায়েন্ট অ্যাপের সেই কার্যকারিতা প্রয়োজন হলে সার্ভার-সাইড কোড।
ইন্সট্যান্স আইডি পরিষেবা একটি InstanceIDListenerService
এ কলব্যাকের মাধ্যমে একটি InstanceID
রিসেট করার জন্য আপনার অ্যাপকে অবহিত করে। যদি আপনার অ্যাপটি এই বিজ্ঞপ্তিটি পায়, তাহলে এটিকে অবশ্যই getToken()
কল করতে হবে এবং নতুন InstanceID
পুনরুদ্ধার করতে হবে এবং এর সার্ভার আপডেট করতে হবে।
InstanceID
এর মালিকানা প্রমাণ করতে এবং সার্ভারগুলিকে অ্যাপের সাথে যুক্ত ডেটা বা পরিষেবাগুলি অ্যাক্সেস করার অনুমতি দিতে getToken
পদ্ধতি ব্যবহার করুন৷ পদ্ধতিটি OAuth2 এর প্যাটার্ন অনুসরণ করে এবং একটি authorizedEntity
এবং scope
প্রয়োজন। authorizedEntity
একটি প্রজেক্ট আইডি বা অন্য InstanceID
হতে পারে, এবং এটি উত্পন্ন টোকেন ব্যবহার করার জন্য অনুমোদিত পরিষেবাগুলি নির্ধারণ করে৷ scope
নির্দিষ্ট পরিষেবা বা ডেটা নির্ধারণ করে যেখানে টোকেন অ্যাক্সেসের অনুমতি দেয়।
এর জন্য ইনস্ট্যান্স আইডি API সম্পর্কে আরও জানুন:
অ্যান্ড্রয়েড আইওএস সার্ভার
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-09-04 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-09-04 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eThe Instance ID API provides a unique identifier for each app instance and enables authentication and authorization.\u003c/p\u003e\n"],["\u003cp\u003eInstance IDs are long-lived but can expire due to various factors like device reset, uninstallation, data clearing, extended inactivity, or service-detected issues.\u003c/p\u003e\n"],["\u003cp\u003eUpon Instance ID reset, apps are notified and must retrieve a new ID using \u003ccode\u003egetToken()\u003c/code\u003e and update their servers.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egetToken()\u003c/code\u003e method, using OAuth2 patterns, verifies Instance ID ownership and grants server access to associated data or services based on authorized entity and scope.\u003c/p\u003e\n"]]],[],null,["# Instance ID API\n\nThe Instance ID API lets you integrate Instance ID with your Android\nor iOS app. Instance ID provides a unique identifier for each instance of\nyour app and a mechanism to authenticate and authorize actions. The `InstanceID` is long\nlived, but may expire for the following reasons:\n\n- Device factory reset.\n- User uninstalls the app.\n- User performs \"Clear Data\" in the app.\n- Device unused for an extended period (device and region determines the timespan).\n- Instance ID service detects abuse or errors and resets the `InstanceID`.\n- Server-side code if your client app requires that functionality.\n\nThe Instance ID service notifies your app of an `InstanceID` reset via\ncallback to a `InstanceIDListenerService`. If your app receives this\nnotification, it must call `getToken()` and retrieve the new `InstanceID`,\nand update its servers.\n\nUse the `getToken` method to prove the ownership of the `InstanceID` and to allow\nservers to access data or services associated with the app. The method follows\nthe patterns of OAuth2, and requires an `authorizedEntity` and `scope`. The\n`authorizedEntity` can be a project ID or another `InstanceID`, and it determines\nthe services that are authorized to use the generated token. The `scope`\ndetermines the specific service or data to which the token allows access.\n\nLearn more about the Instance ID API for:\n\n[Android](/instance-id/reference/android/api)\n[iOS](/instance-id/reference/ios/api)\n[Server](/instance-id/reference/server)"]]