How do I get a user's MyFitnessPal username from user_id?
Call the Athlete endpoint to get the provider-side username from a Terra user_id
Call the Athlete endpoint to get the provider-side username from a Terra user_id:
GET /v2/athlete?user_id=<TERRA_USER_ID>Include your dev-id and x-api-key headers. In the response, the provider_user_id field is the provider-side username (for MyFitnessPal, the MFP username).
To verify the user's diary/sharing, visit myfitnesspal.com/food/diary/<MFP_USERNAME>:
If food entries show, sharing is configured correctly.
Otherwise, the user must update their sharing settings.
PreviousCan I share one reference_id across multiple users?
NextHow do I verify a connection with userInfo?
Last updated
Was this helpful?