UserPhoto
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Representasi JSON |
{
"id": string,
"primaryEmail": string,
"kind": string,
"etag": string,
"photoData": string,
"mimeType": string,
"width": integer,
"height": integer
} |
Kolom |
id |
string
ID yang digunakan API untuk mengidentifikasi pengguna secara unik.
|
primaryEmail |
string
Alamat email utama pengguna.
|
kind |
string
Jenis resource API. Untuk resource Foto, ini adalah admin#directory#user#photo .
|
etag |
string
ETag resource.
|
photoData |
string (bytes format)
Data upload foto pengguna dalam format Base64 yang aman bagi web dalam byte. Artinya:
- Karakter garis miring (/) diganti dengan karakter garis bawah (_).
- Karakter tanda plus (+) diganti dengan karakter tanda hubung (-).
- Karakter tanda sama dengan (=) diganti dengan tanda bintang (*).
- Untuk padding, karakter titik (.) digunakan, bukan definisi baseURL RFC-4648 yang menggunakan tanda sama dengan (=) untuk padding. Hal ini dilakukan untuk menyederhanakan penguraian URL.
- Apa pun ukuran foto yang diupload, API akan memperkecil ukurannya menjadi 96x96 piksel.
String berenkode base64.
|
mimeType |
string
Jenis MIME foto. Nilai yang diizinkan adalah JPEG , PNG , GIF , BMP , TIFF , dan encoding base64 yang aman untuk web.
|
width |
integer
Lebar foto dalam piksel.
|
height |
integer
Tinggi foto dalam piksel.
|
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-24 UTC.
[null,null,["Terakhir diperbarui pada 2025-07-24 UTC."],[],[],null,["# UserPhoto\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"id\": string, \"primaryEmail\": string, \"kind\": string, \"etag\": string, \"photoData\": string, \"mimeType\": string, \"width\": integer, \"height\": integer } ``` |\n\n| Fields ||\n|----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `id` | `string` The ID the API uses to uniquely identify the user. |\n| `primaryEmail` | `string` The user's primary email address. |\n| `kind` | `string` The type of the API resource. For Photo resources, this is `admin#directory#user#photo`. |\n| `etag` | `string` ETag of the resource. |\n| `photoData` | `string (`[bytes](https://developers.google.com/discovery/v1/type-format)` format)` The user photo's upload data in [web-safe Base64](https://en.wikipedia.org/wiki/Base64#URL_applications) format in bytes. This means: - The slash (/) character is replaced with the underscore (_) character. - The plus sign (+) character is replaced with the hyphen (-) character. - The equals sign (=) character is replaced with the asterisk (\\*). - For padding, the period (.) character is used instead of the RFC-4648 baseURL definition which uses the equals sign (=) for padding. This is done to simplify URL-parsing. - Whatever the size of the photo being uploaded, the API downsizes it to 96x96 pixels. A base64-encoded string. |\n| `mimeType` | `string` The MIME type of the photo. Allowed values are `JPEG`, `PNG`, `GIF`, `BMP`, `TIFF`, and web-safe base64 encoding. |\n| `width` | `integer` Width of the photo in pixels. |\n| `height` | `integer` Height of the photo in pixels. |"]]