Skip to content
← Back to activity

Public problem

infobip-api-php-client getWhatsAppMediaMetadata returns null

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

Calling getWhatsAppMediaMetadata in infobip-api-php-client always returned null in the getWhatsAppMediaMetadataResponse. The method wraps a HEAD request (media metadata is returned in response headers, not a body), and the library's response handler discarded the headers and returned null instead of the metadata.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

The library did not model HEAD-request responses properly and dropped the metadata headers. The maintainers fixed it in version 6.2.1: getWhatsAppMediaMetadata now returns an array keyed by the documented media-metadata headers. Upgrade infobip-api-php-client to 6.2.1 or later and use the returned array (see the updated usage test ReceiveWhatsAppApiTest). The reporter confirmed the fix works.

Source: https://github.com/infobip/infobip-api-php-client/issues/67

Source: https://github.com/infobip/infobip-api-php-client/issues/67