cometchat / cometchat-sample-app-flutter

Voice & Video Calling and Text Chat App for Flutter
https://www.cometchat.com
Other
34 stars 29 forks source link

How to add friends for an individual uid? #4

Closed narmuni123 closed 2 years ago

narmuni123 commented 2 years ago

Hi, I want to know how can I add friends to a user. @Shantanu-CometChat

smit-sk commented 2 years ago

You have to call POST request as shown below. Ex - var header = { 'content-type': 'Application/json', 'apikey': "APIKEY", }; var data = { 'accepted': ['{UID}'] }; http.Response response = await http.post( Uri.parse( "https://{APPID}.api-{REGION}.cometchat.io/v3/users/{UID}/friends"), headers: header, body: jsonEncode(data));

smit-sk commented 2 years ago

This was me. Anyway Thanks

On Wed, Sep 21, 2022, 6:58 PM Munikiran N @.***> wrote:

Closed #4 https://github.com/cometchat-pro/flutter-chat-app/issues/4 as completed.

— Reply to this email directly, view it on GitHub https://github.com/cometchat-pro/flutter-chat-app/issues/4#event-7430946053, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQHUQVOK3M2GZE5APH6WZ6DV7MEPJANCNFSM5575HE6Q . You are receiving this because you commented.Message ID: @.***>