आपको Google Photos Library API का लेगसी दस्तावेज़ दिख रहा है.
Method: albums.share
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
किसी एल्बम को शेयर किया गया और दूसरे उपयोगकर्ताओं के लिए ऐक्सेस करने लायक के रूप में चिह्नित करता है. यह कार्रवाई सिर्फ़ उन एल्बम पर की जा सकती है जिन्हें डेवलपर ने एपीआई के ज़रिए बनाया है.
एचटीटीपी अनुरोध
POST https://photoslibrary.googleapis.com/v1/albums/{albumId}:share
यह यूआरएल gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल करता है.
पाथ पैरामीटर
पैरामीटर |
albumId |
string
ज़रूरी है. शेयर किए जाने वाले एल्बम का आइडेंटिफ़ायर. यह albumId किसी ऐसे एल्बम से जुड़ा होना चाहिए जिसे डेवलपर ने बनाया है.
|
अनुरोध का मुख्य भाग
अनुरोध के मुख्य भाग में यह डेटा होता है:
फ़ील्ड |
sharedAlbumOptions |
object (SharedAlbumOptions )
एल्बम को शेयर किए जाने वाले एल्बम में बदलते समय सेट किए जाने वाले विकल्प.
|
जवाब का मुख्य भाग
किसी एल्बम को सफलतापूर्वक शेयर करने का जवाब.
अगर एपीआई सही से जुड़ जाता है, ताे जवाब के मुख्य भाग में नीचे दिए गए स्ट्रक्चर शामिल होता है.
JSON के काेड में दिखाना |
{
"shareInfo": {
object (ShareInfo )
}
} |
फ़ील्ड |
shareInfo |
object (ShareInfo )
सिर्फ़ आउटपुट के लिए. शेयर किए गए एल्बम के बारे में जानकारी.
|
अनुमति के दायरे
नीचे दिए गए OAuth के लिंक की ज़रूरत हाेती है:
https://www.googleapis.com/auth/photoslibrary.sharing
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eMarks an album as shared, making it accessible to other users, but only for albums created via the API.\u003c/p\u003e\n"],["\u003cp\u003eRequires an HTTP POST request to a specific URL with the album ID as a path parameter.\u003c/p\u003e\n"],["\u003cp\u003eThe request body includes shared album options, and the response provides shared album information.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization is necessary using the \u003ccode\u003ehttps://www.googleapis.com/auth/photoslibrary.sharing\u003c/code\u003e scope.\u003c/p\u003e\n"]]],[],null,["# Method: albums.share\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ShareAlbumResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nMarks an album as shared and accessible to other users. This action can only be performed on albums which were created by the developer via the API.\n\n### HTTP request\n\n`POST https://photoslibrary.googleapis.com/v1/albums/{albumId}:share`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|-----------|---------------------------------------------------------------------------------------------------------------------------|\n| `albumId` | `string` Required. Identifier of the album to be shared. This `albumId` must belong to an album created by the developer. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"sharedAlbumOptions\": { object (/photos/library/legacy/reference/rest/v1/albums#Album.SharedAlbumOptions) } } ``` |\n\n| Fields ||\n|----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `sharedAlbumOptions` | `object (`[SharedAlbumOptions](/photos/library/legacy/reference/rest/v1/albums#Album.SharedAlbumOptions)`)` Options to be set when converting the album to a shared album. |\n\n### Response body\n\nResponse to successfully sharing an album.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------|\n| ``` { \"shareInfo\": { object (/photos/library/legacy/reference/rest/v1/albums#Album.ShareInfo) } } ``` |\n\n| Fields ||\n|-------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| `shareInfo` | `object (`[ShareInfo](/photos/library/legacy/reference/rest/v1/albums#Album.ShareInfo)`)` Output only. Information about the shared album. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/photoslibrary.sharing`"]]