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

# What is Monei Connect?

> Let your platform access a user's Monei wallet on their behalf securely, with user consent, via OAuth 2.0

Monei Connect lets you build third-party apps that interact with a user's Monei wallet with their explicit approval. It's Monei's OAuth 2.0 layer.

Think of it like "Sign in with Google" but for financial operations. Instead of reading an email or profile, your app can read balances, send money, pay bills, or execute swaps, all on the user's behalf, with only the permissions they choose to grant.

<Info>
  Monei Connect is for **third-party developers** building apps on top of Monei. If you're building your own product directly with Monei APIs, use an [API key](/introduction/authentication) instead.
</Info>

***

## When to use Connect

| Use case                                                       | Auth method   |
| -------------------------------------------------------------- | ------------- |
| Building your own product with Monei infrastructure            | API key       |
| Building an app that accesses **another user's** Monei account | Monei Connect |

**Examples of Connect use cases:**

* A budgeting app that reads a user's Monei transaction history
* A payroll platform that sends Naira from an employer's Monei wallet to employees
* A DeFi dashboard that executes swaps on behalf of a user
* A savings app that moves funds between a user's sub-wallets

***

## How it works

Monei Connect follows the standard **OAuth 2.0 Authorization Code Flow**:

<Steps>
  <Step title="Your app redirects the user to Monei">
    You send the user to `monei.cc/connect/authorize` with your `client_id`, requested scopes, and a `state` value.
  </Step>

  <Step title="User reviews and approves permissions">
    Monei shows the user a consent screen listing exactly what your app is asking to do. The user can approve all scopes, or only some of them.
  </Step>

  <Step title="Monei redirects back to your app">
    After approval, Monei redirects to your `redirect_uri` with a short-lived `code` in the query string.
  </Step>

  <Step title="Your server exchanges the code for tokens">
    Your backend makes a server-to-server call to exchange the code for an `access_token` and `refresh_token`. This must happen server-side never in the browser.
  </Step>

  <Step title="Call Monei APIs on behalf of the user">
    Use the access token as a Bearer token on any API call. The token only works for the scopes the user approved.
  </Step>
</Steps>

***

## Key concepts

**Scopes:** permissions your app requests. Each scope unlocks a specific set of API endpoints. Request only what you need, users are more likely to approve minimal, specific requests. See the full [Scopes reference](/connect/scopes).

**Partial grants:** users control which scopes they approve individually. Your app must handle receiving fewer scopes than it requested. See [Handling Partial Grants](/connect/partial-grants).

**Access tokens:** short-lived tokens (1 hour) used to call Monei APIs as the user. Prefix: `mct_`

**Refresh tokens:** long-lived tokens used to get a new access token without the user re-authorizing. Prefix: `mcr_`

**Client credentials:** your app's identity. `client_id` is public (`mc_`). `client_secret` is secret (`mcs_`) and only shown once at registration.

***

## What's different from a regular API key

|                       | API Key                         | Connect Token               |
| --------------------- | ------------------------------- | --------------------------- |
| Who it represents     | You (the developer)             | A specific Monei user       |
| Scope                 | Full access to your own account | Only what the user approved |
| User consent required | No                              | Yes                         |
| Expiry                | Until revoked                   | 1 hour (refreshable)        |
| Use case              | Your own product                | Third-party access          |

***

<CardGroup cols={2}>
  <Card title="Register Your App" icon="screwdriver-wrench" href="/connect/register-app">
    Create a developer account and register your app to get credentials
  </Card>

  <Card title="Quickstart" icon="rocket" href="/connect/quickstart">
    Full working integration in under 10 minutes
  </Card>

  <Card title="Scopes Reference" icon="key" href="/connect/scopes">
    Every scope, what it unlocks, and which endpoints it covers
  </Card>

  <Card title="OAuth Flow" icon="arrows-rotate" href="/connect/oauth-flow">
    Deep dive into each step of the authorization flow
  </Card>
</CardGroup>
