ওভারভিউ
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
Google Wallet Passes API অংশীদারদের জন্য Google Wallet-এ রোটেটিং বারকোড সংরক্ষণ করার ক্ষমতা প্রদান করে৷ এই বারকোডগুলি শুধুমাত্র অল্প সময়ের জন্য বৈধ, বারকোড স্ক্রিনশটিংয়ের ঝুঁকি কমাতে অতিরিক্ত নিরাপত্তা প্রদান করে৷ RFC 6238 অনুযায়ী ডিভাইসে বারকোড তৈরি করা হয়, অংশীদার গোপন কী প্রদান করে। যাইহোক, যদি একজন অংশীদার নিজেরাই বারকোড তৈরি করতে চান, তাহলে Google একটি API প্রদান করে যাতে বারকোডগুলি Google-এ ব্যাচ আপলোড করা যায়। এই বারকোডগুলি তারপরে ব্যবহারকারীদের ফোনে পাঠানো হবে, যেখানে তারা অল্প সময়ের জন্য প্রদর্শিত বারকোডগুলি ঘোরানোর মতো কাজ করবে৷ আমরা এই সমাধানটিকে পার্টনার-জেনারেটেড রোটেটিং বারকোড হিসাবে উল্লেখ করি।
পার্টনার-জেনারেটেড রোটেটিং বারকোড API
পার্টনার-জেনারেটেড রোটেটিং বারকোড একই ঘূর্ণন বারকোড অবজেক্ট ব্যবহার করে তৈরি করা হয়। শুধুমাত্র টাইপ প্রয়োজন, যদিও আমরা বারকোডের একটি ছোট, স্টার্টার সেট তৈরি করার পরামর্শ দিই (~10 মিনিটের মূল্যের), এবং সেগুলিকে initialRotatingBarcodeValues
বারকোড ভ্যালুসে পাঠানো। ব্যবহারকারীর জন্য সর্বদা একটি বৈধ বারকোড প্রস্তুত রয়েছে তা নিশ্চিত করার জন্য অংশীদার দায়ী, এবং initialRotatingBarcodeValues
পরবর্তী ব্যাচ আপলোড কলটিকে অ্যাসিঙ্ক্রোনাস হতে দেয়।
rotatingBarcode {
initialRotatingBarcodeValues: object (RotatingBarcodeValues),
type: enum (BarcodeType),
}
মাঠ | বর্ণনা | initialRotatingBarcodeValues | object ( RotatingBarcodeValues ) বারকোডে এনকোড করার মানগুলি৷ অন্তত একটি মান প্রয়োজন. এই প্রাথমিক বারকোডগুলি ব্যবহারকারী যখন প্রথমবার তাদের পাস অর্জন করে এবং পরবর্তী ব্যাচ আপলোড কল করা হয় তখন এর মধ্যে ব্যবধান পূরণ করার জন্য। |
type | enum ( BarcodeType ) প্রয়োজন। এই বারকোডের ধরন। গ্রহণযোগ্য মান হল: |
আবর্তিত বারকোড মান মাঠ | বর্ণনা | startDateTime | string প্রথম বারকোড যে তারিখ/সময় থেকে বৈধ। periodMillis ব্যবহার করে বারকোডগুলি ঘোরানো হবে। এটি একটি ISO 8601 বর্ধিত বিন্যাস তারিখ/সময়, একটি অফসেট সহ। |
values[] | string বারকোডে এনকোড করার মানগুলি৷ অন্তত একটি মান প্রয়োজন. কোন সর্বোচ্চ সংখ্যক মান নেই, তবে মনে রাখবেন অনুরোধের অংশের আকার 5MB এর বেশি হতে পারে না। |
periodMillis | number প্রতিটি বারকোড কত সময়ের জন্য বৈধ। |
ব্যাচ আপডেট করা বারকোড মান
RotatingBarcode অবজেক্ট তৈরি হওয়ার পর, ব্যবহারকারীর পাসের মেয়াদ শেষ না হওয়া পর্যন্ত আমরা প্রতিদিন এক দিনের মূল্যের বারকোড আপলোড করার পরামর্শ দিই। এটি নিম্নলিখিত REST API শেষ পয়েন্ট দিয়ে করা যেতে পারে।
পদ্ধতি: transitobject.uploadrotatingbarcodevalues
প্রদত্ত অবজেক্ট আইডি দ্বারা উল্লেখিত ট্রানজিট অবজেক্টে ঘূর্ণায়মান বারকোড মান আপলোড করে।
HTTP অনুরোধ
POST https://walletobjects.googleapis.com/upload/walletobjects/v1/transitObject/{resourc eId}/uploadRotatingBarcodeValues
পাথ প্যারামিটার
প্যারামিটার | বর্ণনা | resourceId | string একটি বস্তুর অনন্য শনাক্তকারী। |
শরীরের অনুরোধ
অনুরোধের মূল অংশে (যা 5MB অতিক্রম করতে পারে না) RotatingBarcodeValues- এর একটি উদাহরণ রয়েছে।
পদ্ধতি: transitobject.downloadrotatingbarcodevalues
প্রদত্ত অবজেক্ট আইডি দ্বারা উল্লেখিত ট্রানজিট অবজেক্টের জন্য ঘূর্ণমান বারকোড মান ডাউনলোড করে। অংশীদাররা সর্বশেষ ব্যাচ যাচাই করতে চাইলে এটি কার্যকর।
HTTP অনুরোধ
GET https://walletobjects.googleapis.com/walletobjects/v1/transitObject/{resourceId}/do wnloadRotatingBarcodeValues?alt=media
পাথ প্যারামিটার
প্যারামিটার | বর্ণনা | resourceId | string একটি বস্তুর অনন্য শনাক্তকারী। |
ফলব্যাক মেকানিজম
মনে রাখবেন যে যদি অন্যথায়-বৈধ RotatingBarcode-এর প্রদর্শনের জন্য কোনো বৈধ বারকোড না থাকে (সেগুলি এখনও আপলোড করা হয়নি, বা সমস্ত বর্তমান বারকোড ব্যবহার করা হয়েছে), ব্যবহারকারীকে একটি ত্রুটি বার্তা দেখানো হবে৷
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-25 UTC-তে শেষবার আপডেট করা হয়েছে।
[[["সহজে বোঝা যায়","easyToUnderstand","thumb-up"],["আমার সমস্যার সমাধান হয়েছে","solvedMyProblem","thumb-up"],["অন্যান্য","otherUp","thumb-up"]],[["এতে আমার প্রয়োজনীয় তথ্য নেই","missingTheInformationINeed","thumb-down"],["খুব জটিল / অনেক ধাপ","tooComplicatedTooManySteps","thumb-down"],["পুরনো","outOfDate","thumb-down"],["অনুবাদ সংক্রান্ত সমস্যা","translationIssue","thumb-down"],["নমুনা / কোড সংক্রান্ত সমস্যা","samplesCodeIssue","thumb-down"],["অন্যান্য","otherDown","thumb-down"]],["2025-07-25 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eGoogle Wallet now supports Partner-Generated Rotating Barcodes for enhanced security, allowing partners to generate and upload time-limited barcodes directly.\u003c/p\u003e\n"],["\u003cp\u003ePartners can integrate Rotating Barcodes using the \u003ccode\u003erotatingBarcode\u003c/code\u003e object within the Google Wallet Passes API, specifying the barcode type and initial values.\u003c/p\u003e\n"],["\u003cp\u003eThe API provides methods for batch uploading (\u003ccode\u003etransitobject.uploadrotatingbarcodevalues\u003c/code\u003e) and downloading (\u003ccode\u003etransitobject.downloadrotatingbarcodevalues\u003c/code\u003e) barcode values for ongoing updates.\u003c/p\u003e\n"],["\u003cp\u003eTo ensure continuous barcode availability, it is recommended to upload a day's worth of barcodes daily until a user's pass expires, utilizing the \u003ccode\u003einitialRotatingBarcodeValues\u003c/code\u003e for a smooth initial experience.\u003c/p\u003e\n"],["\u003cp\u003eIf a Rotating Barcode lacks valid values, an error message will be displayed to the user, highlighting the importance of timely barcode updates.\u003c/p\u003e\n"]]],["The Google Wallet Passes API enables partners to use Partner-Generated Rotating Barcodes, enhancing security by having barcodes valid for a short time. Partners can define a `RotatingBarcode` object specifying the barcode `type` and `initialRotatingBarcodeValues`. They then batch upload barcode values using the `transitobject.uploadrotatingbarcodevalues` API endpoint and should upload a day's worth of barcodes each day. Barcode values can be downloaded via `transitobject.downloadrotatingbarcodevalues` for verification. If no valid barcodes are available, an error message is shown.\n"],null,["# Overview\n\nThe Google Wallet Passes API provides the ability for partners to save\n[Rotating\nBarcodes](/wallet/tickets/transit-passes/qr-code/resources/rotating-barcodes) to the Google Wallet. These barcodes are only valid for a short period of time,\nproviding additional security to reduce the risk of barcode screenshotting. The\nbarcodes are generated on device in accordance with\n[RFC 6238](https://www.rfc-editor.org/rfc/rfc6238), with the partner providing the\nsecret key. However, if a partner would rather generate the barcodes themselves, Google provides\nan API such that barcodes can be batch uploaded to Google. These barcodes will then\nbe passed through to users' phones, where they will act just like Rotating Barcodes,\ndisplaying for a short period of time. We refer to this solution as Partner-Generated\nRotating Barcodes.\n\nPartner-Generated Rotating Barcode API\n--------------------------------------\n\nPartner-Generated Rotating Barcodes are created using the same RotatingBarcode\nobject. Only the type is required, although we also recommend creating a small, starter\nset of barcodes (\\~10 minutes worth), and sending them in\n`initialRotatingBarcodeValues`. The partner is responsible for ensuring that there is\nalways a valid barcode ready for the user, and `initialRotatingBarcodeValues` allows\nthe subsequent batch upload call to be asynchronous. \n\n```gdscript\n rotatingBarcode {\n initialRotatingBarcodeValues: object (RotatingBarcodeValues),\n type: enum (BarcodeType),\n }\n```\n\n| Field | Description |\n|--------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `initialRotatingBarcodeValues` | `object (`[RotatingBarcodeValues](#RotatingBarcodeValues)`)` The values to encode in the barcode. At least one value is required. These initial barcodes are meant to bridge the gap between when the user first acquires their pass, and when the subsequent batch upload call is made. |\n| `type` | `enum (`[BarcodeType](/wallet/tickets/transit-passes/qr-code/rest/v1/BarcodeType)`)` Required. The type of this barcode. Acceptable values are: - `QR_CODE` - `PDF_417` \u003cbr /\u003e |\n\nRotatingBarcodeValues\n\n| Field | Description |\n|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `startDateTime` | `string` The date/time the first barcode is valid from. Barcodes will be rotated through using `periodMillis`. This is an ISO 8601 extended format date/time, with an offset. |\n| `values[]` | `string` The values to encode in the barcode. At least one value is required. There is no maximum number of values, but note that the size of the request body cannot exceed 5MB. |\n| `periodMillis` | `number` The amount of time each barcode is valid for. |\n\nBatch updating barcode values\n-----------------------------\n\nAfter the RotatingBarcode object has been created, we recommend uploading a day's\nworth of barcodes, every day, until the user's pass expires. This can be done with the\nfollowing REST API endpoint.\n\n### Method: transitobject.uploadrotatingbarcodevalues\n\nUploads rotating barcode values to the transit object referenced by the given object ID.\n\n#### HTTP request\n\n`POST\nhttps://walletobjects.googleapis.com/upload/walletobjects/v1/transitObject/{resourc\neId}/uploadRotatingBarcodeValues`\n\n#### Path parameters\n\n| Parameter | Description |\n|--------------|-----------------------------------------------|\n| `resourceId` | `string` The unique identifier for an object. |\n\n#### Request body\n\nThe request body (which cannot exceed 5MB) contains an instance of\n[RotatingBarcodeValues](#RotatingBarcodeValues).\n\n### Method: transitobject.downloadrotatingbarcodevalues\n\nDownloads rotating barcode values for the transit object referenced by the given object\nID. This is useful if partners want to verify the latest batch.\n\n#### HTTP request\n\n`GET\nhttps://walletobjects.googleapis.com/walletobjects/v1/transitObject/{resourceId}/do\nwnloadRotatingBarcodeValues?alt=media`\n\n#### Path parameters\n\n| Parameter | Description |\n|--------------|-----------------------------------------------|\n| `resourceId` | `string` The unique identifier for an object. |\n\nFallback mechanisms\n-------------------\n\nNote that if an otherwise-valid RotatingBarcode has no valid barcodes to display (they haven't been uploaded yet, or all the current barcodes have been used), an error message will be shown to the user."]]