get_whats_app_message_media
¶
get_whats_app_message_media(
media_id: WhatsAppMediaId,
origination_phone_number_id: WhatsAppPhoneNumberId,
*,
config_overrides: Optional[SocialMessagingClientConfig] = None,
metadata_only: Optional[bool] = None,
destination_s3_presigned_url: Optional[S3PresignedUrl] = None,
destination_s3_file: Optional[S3File] = None,
) -> GetWhatsAppMessageMediaOutput
Get a media file from the WhatsApp service. On successful completion the media file is retrieved from Meta and stored in the specified Amazon S3 bucket. Use either destinationS3File or destinationS3PresignedUrl for the destination. If both are used then an InvalidParameterException is returned.
Parameters:
-
media_id(WhatsAppMediaId) –The unique identifier for the media file.
-
origination_phone_number_id(WhatsAppPhoneNumberId) –The unique identifier of the originating phone number for the WhatsApp message media. The phone number identifiers are formatted as
phone-number-id-01234567890123456789012345678901. Use GetLinkedWhatsAppBusinessAccount to find a phone number's id. -
metadata_only(Optional[bool], default:None) –Set to
Trueto get only the metadata for the file. -
destination_s3_presigned_url(Optional[S3PresignedUrl], default:None) –The presign url of the media file.
-
destination_s3_file(Optional[S3File], default:None) –The
bucketNameandkeyof the S3 media file.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
ValidationException–The request contains an invalid parameter value.
-
AccessDeniedByMetaException–You do not have sufficient access to perform this action.
-
DependencyException–Thrown when performing an action because a dependency would be broken.
-
InternalServiceException–The request processing has failed because of an unknown error, exception, or failure.
-
InvalidParametersException–One or more parameters provided to the action are not valid.
-
ResourceNotFoundException–The resource was not found.
-
ThrottledRequestException–The request was denied due to request throttling.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_socialmessaging/_services/social_messaging.py
2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 | |