> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mobilerun.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Credentials

> Securely store and manage authentication credentials for automated app interactions.

The Credentials tab allows you to create and manage secure credentials that your agent can use when automating apps. Store login information, API tokens, and other secrets without exposing them in your prompts.

## Overview

The Credentials tab provides:

* Secure storage for app credentials
* Per-app credential organization
* Encrypted secret management
* Credential attachment for agent tasks

## Security Model

<Warning>
  Credentials are always encrypted at rest and in transit. The agent never has access to raw passwords or secrets.
</Warning>

When the agent needs to authenticate:

1. The agent identifies a login field in the app
2. It requests the credential from the secure vault
3. The credential is injected directly into the field
4. The raw value is never exposed to the agent's context

This architecture ensures your secrets remain protected even during automated interactions.

## Credential Structure

Credentials are organized by app package name. Each credential can contain multiple fields:

| Field Type            | Description                       |
| --------------------- | --------------------------------- |
| **Username**          | Account username or identifier    |
| **Email**             | Email address for login           |
| **Password**          | Account password (encrypted)      |
| **API Token**         | API keys or access tokens         |
| **Phone Number**      | Phone number for SMS verification |
| **Two-Factor Secret** | TOTP secret for 2FA codes         |
| **Backup Codes**      | Recovery codes for account access |

## Creating Credentials

To add credentials for an app:

1. Click **Add Credential**
2. Select the app package name from your [app library](/apps)
3. Enter a credential name (e.g., "Production Account", "Test User")
4. Add the required fields (username, password, etc.)
5. Save the credential

<Info>
  You can create multiple credentials per app. This is useful for testing different account types or environments.
</Info>

## Managing Credentials

### View Credentials

Your credential list shows:

* App package name
* Credential name
* Field types configured (without revealing values)
* Last modified date

### Edit Credentials

Update credential fields when passwords change or tokens expire. Click on any credential to modify its fields.

### Delete Credentials

Remove credentials that are no longer needed. This action is permanent and cannot be undone.

## Using Credentials in Tasks

Attach credentials to your agent tasks to enable authenticated automation:

### In the Playground

Select the credentials to use before running your task. The agent will have access to inject these credentials when it encounters login screens.

### Via API

Specify credentials in your task configuration:

```json theme={null}
{
  "task": "Log into the app and check notifications",
  "credentials": [
    {
      "packageName": "com.example.app",
      "credentialNames": ["Production Account"]
    }
  ]
}
```

### Multiple Credentials

You can attach credentials for multiple apps in a single task. The agent will use the appropriate credential based on which app it is interacting with.

## Best Practices

| Practice                  | Description                                                  |
| ------------------------- | ------------------------------------------------------------ |
| **Use descriptive names** | Name credentials clearly (e.g., "QA Test Account")           |
| **Separate environments** | Create distinct credentials for dev, staging, and production |
| **Rotate regularly**      | Update credentials when passwords change                     |
| **Minimal access**        | Only attach credentials the task actually needs              |
