flickr.photos.setSafetyLevel

Set the safety level of a photo.

Authentication

This method requires authentication with 'write' permission.

Note: This method requires an HTTP POST request.

Arguments

api_key (Required)
Your API application key. See here for more details.
photo_id (Required)
The id of the photo to set the adultness of.
safety_level (Optional)
The safety level of the photo. Must be one of: 1 for Safe, 2 for Moderate, and 3 for Restricted.
hidden (Optional)
Whether or not to additionally hide the photo from public searches. Must be either 1 for Yes or 0 for No.

Example Response

<rsp stat="ok">
  <photo id="14814" safety_level="2" hidden="0" />
</rsp>

Error Codes

1: Photo not found
The photo id passed was not a valid photo id of a photo belonging to the calling user.
2: Invalid or missing arguments
Neither a valid safety level nor a hidden value were passed.
3: Change not allowed
Changing the safety level of this photo is not allowed.
4: Safety level not allowed
Safety level chosen will create conflict with account's photo limits.
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.
111: Format "xxx" not found
The requested response format was not found.
112: Method "xxx" not found
The requested method was not found.
114: Invalid SOAP envelope
The SOAP envelope send in the request could not be parsed.
115: Invalid XML-RPC Method Call
The XML-RPC request document could not be parsed.
116: Bad URL found
One or more arguments contained a URL that has been used for abuse on Flickr.

API Explorer

API Explorer : flickr.photos.setSafetyLevel