GET /v1/users/:id_or_login/picture
HTTP Verb: GET
Available statuses:200 OK, 204 No Content, 403 Forbidden, 404 Not Found
Object: n/a
Location: n/a
Formats: binary
Returns a user profile picture by redirecting to picture resource or URL to user picture resource.
Params
| Param | Description |
|---|---|
| show_url | If present then URL of user picture is requested; if not present then picture binary data is requested. |
Example
Request a user picture, using cURL utility:
curl -i -L -H "Authorization: Bearer _token" https://api.assembla.com/v1/users/_id_or_login/picture
HTTP/2 302
Date: Tue, 06 Aug 2019 13:45:04 GMT
Content-Type: text/html; charset=utf-8
Cache-Control: no-cache
Location: https://s3.amazonaws.com/assembla-avatars/dda5e833/aoDccWTcyr6A8taH8tHBnc:1565079297
Status: 302 Found
HTTP/1.1 200 OK
Date: Tue, 06 Aug 2019 13:45:06 GMT
Last-Modified: Tue, 06 Aug 2019 08:14:58 GMT
Accept-Ranges: bytes
Content-Type:
Content-Length: 22015
...
The result of this operation is binary data of an image or URL of an image depending on show_url request parameter presence.
Responses
- 200 OK, success
- 204 No Content, user has no picture uploaded
- 403 Forbidden, no permissions to view the picture
- 404 Not Found, internal error picture can’t be found