POST/users/{userId}/photo

Creates a URL to upload a member's photo.

Note
For how to upload content using the API, see Upload or Download Files.

Authorization

oauth2

OAuth 2.0 authentication.
For more information, see Authentication and Authorization.

Scope

user
directory

HTTP Request

POSThttps://www.worksapis.com/v1.0/users/{userId}/photo

Path Parameters

ParameterTypeDescription
userId string 

Member ID
- Email address
- Resource ID
- External key in "externalKey:{externalKey}" format


required
example : userf7da-f82c-4284-13e7-030f3b4c756x 

Header Parameters

HeadertypeDescription
Authorization string 

Bearer {token}


required 
Content-Type string 

application/json


required
example : application/json 

Request Body

PropertyTypeDescription
fileName string 

File name


required 
fileSize integer 

File size (in bytes). A JPG image of 640 × 640 px is recommended.


required
maximum : 10485760
format : int64 

Request Example

example

1{2  "fileName": "abc.jpg",3  "fileSize": 10244}

Response

HTTP 200

OK

PropertyTypeDescription
uploadUrl string 

Upload URL

 

Response Example

example

1{2  "uploadUrl": "https://apis-storage.worksmobile.com/k/wphotocontact/r/kr1.0/line_If6PHN/img.du_r0RQPt_1629803695068/img.du_r0RQPt_1629803695068.jpg"3}

HTTP 404

Not Found