-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to add a contact with phptdlib? #78
Comments
You don't need encode twice. $query = [
'@type' => 'addContact',
'contact' => [
'phone_number' => '+584145782661',
'first_name' => 'fernando',
'last_name' => 'moutinho',
'vcard' => '',
'user_id' => 0,
],
'share_phone_number' => true,
];
$addContact = $client->query(json_encode($query), 10); |
hello @yaroslavche thank you very much for your prompt response. Personally, it didn't work for me. like that. add the contact by doing the following
I have another question anyway. |
This questions aren't related to phptdlib (and how to send message you can find in docs for this repo). Also |
Hi @yaroslavche ok yes Mr. and if I am reading the documentation to perform all the possible tests. Thanks a lot Regards. |
good morning dear.
this is to request a help to add a contact with phptdlib
I am using the following:
$obj3 = (object)[
'phone_number' => '+584145782661',
'first_name' => 'fernando',
'last_name' => 'moutinho',
'vcard' => [],
'user_id' => 0];
but it shows me the following error message
"{"@type":"error","code":5,"message":"Contact must be non-empty","@extra":1714636915}"
I also tried the contact class
$contact = $client->query(json_encode(['@type' => 'contact', [
'phone_number' => '+584145782661',
'first_name' => 'fernando',
'last_name' => 'moutinho',
'vcard' => [],
'user_id' => 0
]]), 10);
but it shows me the following error message
"{"@type":"error","code":400,"message":"Failed to parse JSON object as TDLib request: Unknown class "contact"","@extra":1714636915}"
Please could you help me.
or make an example of how to add a contact with phptdlib
thanks greetings.
The text was updated successfully, but these errors were encountered: