Friends
The Friends API allows you to retrieve a list of the user’s friends and their public profiles. This requires theFRIENDS permission.
Prerequisites
- User must have authorized your app with the
FRIENDSpermission - User account must be initialized with an authentication token
Setup
Get Friends
Retrieves a list of the user’s friends and their public profiles.Response Type
Each friend in the array is aUserPublicProfile object with the following structure:
Example Response:
Permissions
ThegetFriends() method requires the FRIENDS permission. Users must grant this permission when authorizing your app.
To check if a user has granted the FRIENDS permission:
Error Handling
Use Cases
- Display user’s friends list in your application
- Show friend activity or status
- Enable friend-to-friend features
- Build social features around HandCash connections
Important Notes
- The
FRIENDSpermission must be requested during the initial authorization flow - If a user hasn’t granted the
FRIENDSpermission, the method will throw an error - Friends data is read-only - you cannot add or remove friends through the API
- The friends list reflects the user’s current HandCash friends