You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although the MessageBird docs state it is possible to read a contact using the msisdn instead of the contact ID, I've been unable to achieve this using this PHP api. It won't allow me to input a number with a '+' symbol in it and returns an unspecified error.
Unfortunately, it turns out that the documentation is actually confusing/mixed up here. It is not possible to fetch a single contact by MSISDN, as the MSISDN doesn't have to be unique for your contacts.
It is however possible to search for contacts by MSISDN. You can use the following code to do so:
$client = new \MessageBird\Client('YOUR_ACCESS_KEY');
$contacts = $client->contacts->getList(['msisdn' => 61412345678]);
var_dump($contacts->items);
Please make sure to format your MSISDN as digits only.
I will flag the issue with the documentation internally and we will make sure to clear it up!
Although the MessageBird docs state it is possible to read a contact using the msisdn instead of the contact ID, I've been unable to achieve this using this PHP api. It won't allow me to input a number with a '+' symbol in it and returns an unspecified error.
For API Reference, see: https://developers.messagebird.com/api/contacts/#view-a-contact
Also see this issue on the nodejs wrapper: messagebird/messagebird-nodejs#32
The text was updated successfully, but these errors were encountered: