This is the specification for replacing photographs that have already been uploaded to Flickr.
Like the upload API it works outside the normal Flickr API framework because it involves sending binary files over the wire.
Uploading apps can call the flickr.people.getUploadStatus method in the regular API to obtain file and bandwidth limits for the user.
Photos should be POSTed to the following URL:
This method requires authentication with 'write' permission.
For details of how to obtain authentication tokens and how to sign calls, see the authentication api spec. Note that the 'photo' parameter should not be included in the signature. All other POST parameters should be included when generating the signature.
- The file to upload.
- The ID of the photo to replace.
- Photos may be replaced in async mode, for applications that don't want to wait around for an upload to complete, leaving a socket connection open the whole time. Processing photos asynchronously is recommended. Please consult the documentation for details.
When an upload is successful, the following xml is returned:
<photoid secret="abcdef" originalsecret="abcdef">1234</photoid>
photoid is the id of the photo being replaced. This response is formatted in the REST API response style.
If the upload fails, a REST API error response is returned. The following error codes are possible:
1: Not a pro account
- The calling user must have a pro account.
2: No photo specified
- The photo required argument was missing.
3: General upload failure
- The file was not correctly uploaded.
4: Filesize was zero
- The file was zero bytes in length.
5: Filetype was not recognised
- The file was not of a recognised image format.
6: User exceeded upload limit
- The calling user has reached their monthly bandwidth limit.
95: SSL is required
- SSL is required to access the Flickr API.
96: Invalid signature
- The passed signature was invalid.
97: Missing signature
- The call required signing but no signature was sent.
98: Login failed / Invalid auth token
- The login details or auth token passed were invalid.
99: User not logged in / Insufficient permissions
- The method requires user authentication but the user was not logged in, or the authenticated method call did not have the required permissions.
100: Invalid API Key
- The API key passed was not valid or has expired.
105: Service currently unavailable
- The requested service is temporarily unavailable.
106: Write operation failed
- The requested operation failed due to a temporary issue.
116: Bad URL found
- One or more arguments contained a URL that has been used for abuse on Flickr.