这确实是ElioStruyf的回答。
端点现在称为“照片”而不是“用户照片”
要获取您使用的照片信息:
https://outlook.office365.com/api/beta/Me/photo
获取您调用的照片
https://outlook.office365.com/api/beta/Me/photo/$value
要获取所有可用照片尺寸的列表,请使用此 API 端点 -
https://outlook.office.com/api/beta/me/Photos/
示例响应 -
{
"@odata.context": "https://outlook.office.com/api/beta/$metadata#Me/Photos",
"value": [
{
"@odata.id": "https://outlook.office.com/api/beta/Users('John.Doe@contoso.com')/Photos('48X48')",
"@odata.readLink": "https://outlook.office.com/api/beta/Users('John.Doe@contoso.com')/Photos('48X48')",
"@odata.mediaContentType": "image/jpeg",
"@odata.mediaEtag": "\"7A1F3A9D\"",
"Id": "48X48",
"Height": 48,
"Width": 48
},
{
"@odata.id": "https://outlook.office.com/api/beta/Users('John.Doe@contoso.com')/Photos('64X64')",
"@odata.readLink": "https://outlook.office.com/api/beta/Users('John.Doe@contoso.com')/Photos('64X64')",
"@odata.mediaContentType": "image/jpeg",
"@odata.mediaEtag": "\"7A1F3A9D\"",
"Id": "64X64",
"Height": 64,
"Width": 64
},
{
"@odata.id": "https://outlook.office.com/api/beta/Users('John.Doe@contoso.com')/Photos('96X96')",
"@odata.readLink": "https://outlook.office.com/api/beta/Users('John.Doe@contoso.com')/Photos('96X96')",
"@odata.mediaContentType": "image/jpeg",
"@odata.mediaEtag": "\"7A1F3A9D\"",
"Id": "96X96",
"Height": 96,
"Width": 96
},
{
"@odata.id": "https://outlook.office.com/api/beta/Users('John.Doe@contoso.com')/Photos('120X120')",
"@odata.readLink": "https://outlook.office.com/api/beta/Users('John.Doe@contoso.com')/Photos('120X120')",
"@odata.mediaContentType": "image/jpeg",
"@odata.mediaEtag": "\"7A1F3A9D\"",
"Id": "120X120",
"Height": 120,
"Width": 120
},
{
"@odata.id": "https://outlook.office.com/api/beta/Users('John.Doe@contoso.com')/Photos('240X240')",
"@odata.readLink": "https://outlook.office.com/api/beta/Users('John.Doe@contoso.com')/Photos('240X240')",
"@odata.mediaContentType": "image/jpeg",
"@odata.mediaEtag": "\"7A1F3A9D\"",
"Id": "240X240",
"Height": 240,
"Width": 240
},
{
"@odata.id": "https://outlook.office.com/api/beta/Users('John.Doe@contoso.com')/Photos('360X360')",
"@odata.readLink": "https://outlook.office.com/api/beta/Users('John.Doe@contoso.com')/Photos('360X360')",
"@odata.mediaContentType": "image/jpeg",
"@odata.mediaEtag": "\"7A1F3A9D\"",
"Id": "360X360",
"Height": 360,
"Width": 360
},
{
"@odata.id": "https://outlook.office.com/api/beta/Users('John.Doe@contoso.com')/Photos('432X432')",
"@odata.readLink": "https://outlook.office.com/api/beta/Users('John.Doe@contoso.com')/Photos('432X432')",
"@odata.mediaContentType": "image/jpeg",
"@odata.mediaEtag": "\"7A1F3A9D\"",
"Id": "432X432",
"Height": 432,
"Width": 432
},
{
"@odata.id": "https://outlook.office.com/api/beta/Users('John.Doe@contoso.com')/Photos('504X504')",
"@odata.readLink": "https://outlook.office.com/api/beta/Users('John.Doe@contoso.com')/Photos('504X504')",
"@odata.mediaContentType": "image/jpeg",
"@odata.mediaEtag": "\"7A1F3A9D\"",
"Id": "504X504",
"Height": 504,
"Width": 504
},
{
"@odata.id": "https://outlook.office.com/api/beta/Users('John.Doe@contoso.com')/Photos('648X648')",
"@odata.readLink": "https://outlook.office.com/api/beta/Users('John.Doe@contoso.com')/Photos('648X648')",
"@odata.mediaContentType": "image/jpeg",
"@odata.mediaEtag": "\"7A1F3A9D\"",
"Id": "648X648",
"Height": 648,
"Width": 648
}
]
}
要获取所需照片大小的实际 blob,请调用此 API -
https://outlook.office.com/api/beta/me/Photos('120X120')/$value