zaloplatform / zalo-php-sdk

MIT License
61 stars 41 forks source link

About how to get uid?by id or phone numer? #6

Open humour-picasso opened 6 years ago

humour-picasso commented 6 years ago

I want to Send a message from Offical Account , but I can't get the uid ? In Android SDK,Get profile information,just can got this message { "id": "UserId", "name": "User Name", "gender": "male", "birthday": "01/01/1990", "picture": { "data": { "url": "User avatar url" } } } this id isn't uid ,can't send a message from Offical Account by this id ,if I can get Zalo Account's phone,then I can get uid by https://openapi.zaloapp.com/oa/v1/getprofile? I need some help ,please!

ClarkLusm commented 5 years ago

Same issue. How to get user id from their phone number?

tom1097 commented 4 years ago

I just find out :))) LOL maybe not too late ? 🔢

$data = ['data' => json_encode(array(
    'offset' => 0,
    'count' => 10
))];

$response3 = $zalo->get(ZaloEndPoint::API_OA_GET_LIST_FOLLOWER, $accessToken, $data);
b0yblake commented 1 month ago

I just find out :))) LOL maybe not too late ? 🔢

$data = ['data' => json_encode(array(
    'offset' => 0,
    'count' => 10
))];

$response3 = $zalo->get(ZaloEndPoint::API_OA_GET_LIST_FOLLOWER, $accessToken, $data);

That user need to be subscribe the OA.

But when you need to get the user_id by phone of new user (not subcrible) => no way to get user_id