您正在查看 Google Photos Library API 的旧版文档。
Method: sharedAlbums.join
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
HTTP 请求
POST https://photoslibrary.googleapis.com/v1/sharedAlbums:join
网址采用 gRPC 转码语法。
请求正文
请求正文中包含结构如下的数据:
JSON 表示法 |
{
"shareToken": string
} |
字段 |
shareToken |
string
必需。代表用户加入共享影集的令牌。
|
响应正文
代表用户成功加入共享影集的响应。
如果成功,响应正文将包含结构如下的数据:
JSON 表示法 |
{
"album": {
object (Album )
}
} |
字段 |
album |
object (Album )
用户已加入的共享影集。
|
授权范围
需要以下 OAuth 范围:
https://www.googleapis.com/auth/photoslibrary.sharing
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eJoins a shared album on behalf of a Google Photos user using a provided share token.\u003c/p\u003e\n"],["\u003cp\u003eThe request body requires a shareToken to initiate the joining process.\u003c/p\u003e\n"],["\u003cp\u003eA successful response includes the details of the shared album the user has joined.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/photoslibrary.sharing\u003c/code\u003e scope.\u003c/p\u003e\n"]]],["A POST request is made to `https://photoslibrary.googleapis.com/v1/sharedAlbums:join` to join a shared album. The request body, in JSON format, requires a `shareToken` string. The successful response body contains an `album` object, also in JSON format, representing the joined shared album. Authorization for this action requires the `https://www.googleapis.com/auth/photoslibrary.sharing` OAuth scope. This uses gRPC transcoding syntax.\n"],null,["# Method: sharedAlbums.join\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.JoinSharedAlbumResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nJoins a shared album on behalf of the Google Photos user.\n\n### HTTP request\n\n`POST https://photoslibrary.googleapis.com/v1/sharedAlbums:join`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------|\n| ``` { \"shareToken\": string } ``` |\n\n| Fields ||\n|--------------|--------------------------------------------------------------------------|\n| `shareToken` | `string` Required. Token to join the shared album on behalf of the user. |\n\n### Response body\n\nResponse to successfully joining the shared album on behalf of the user.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------|\n| ``` { \"album\": { object (/photos/library/legacy/reference/rest/v1/albums#Album) } } ``` |\n\n| Fields ||\n|---------|--------------------------------------------------------------------------------------------------------------------|\n| `album` | `object (`[Album](/photos/library/legacy/reference/rest/v1/albums#Album)`)` Shared album that the user has joined. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/photoslibrary.sharing`"]]