> For the complete documentation index, see [llms.txt](https://docs.tryterra.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tryterra.co/faq/help-topics/connecting/regional-and-account-restrictions/mfp-username-and-diary-key-setup.md).

# Why can't I connect MyFitnessPal?

MyFitnessPal connects with your **MFP username and a diary key**, not your email or account password.

{% stepper %}
{% step %}
Find your actual username under `Settings > Profile` in the MFP app (or in the diary URL `myfitnesspal.com/food/diary/USERNAME`).
{% endstep %}

{% step %}
Under `Settings > Diary Settings > Diary Sharing`, set Diary Sharing to **Locked with a Key** (not Public or private).
{% endstep %}

{% step %}
Use that key (it is separate from your password).
{% endstep %}

{% step %}
Reconnect with the username and diary key.
{% endstep %}
{% endstepper %}

The web settings page is the source of truth, since enabling it on mobile may not sync.

The diary-key field clears on error. If your credentials are correct, the error can also be transient, so retry a few times before escalating.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tryterra.co/faq/help-topics/connecting/regional-and-account-restrictions/mfp-username-and-diary-key-setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
