# Getting Started

Momofin API gives you the ability to integrate eSignature into your applications, websites, CRM, or cloud services. It allows you to create templates, create documents from templates.

Follow these steps to start using Momofin API:

* Register for an account
* Setting your subdomain
* Retrieve access token

Next, let’s look at the step-by-step process of how to send your first eSignature request using the Momofin API.

## Register for an account

To register an account, visit the registration page [here](https://app.momofin.com/). Enter your email address and password on the Momofin developer page, then click the **Registrasi** button. You are then required to validate your email by clicking the email link sent by Momofin.

<figure><img src="https://2703754235-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrGtdLsrl3TNiM1E2G4ua%2Fuploads%2FuMjEHroSKf6kPQhfXAXq%2Fimage.png?alt=media&#x26;token=de496651-7dac-401a-828b-1be2079deb0e" alt=""><figcaption><p>Register your account here</p></figcaption></figure>

## Retrieve your subdomain

Get your subdomain from the dashboard. Copy this value for use later when retrieving the access token.

<figure><img src="https://2703754235-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrGtdLsrl3TNiM1E2G4ua%2Fuploads%2FgynoOPp2t0rVC2J6ZTch%2FScreenshot%202024-04-22%20143940.png?alt=media&#x26;token=6247daf6-164f-4eb1-a6e3-19203a81ef70" alt=""><figcaption></figcaption></figure>

## Base URL

The base URL for interacting with the Momofin API depends on your development stage:

* **Development Environment:** Utilize <https://api-dev.momofin.com> throughout development and testing phases. This isolated environment allows you to experiment with the API functionality without impacting the production system.
* **Production Environment:** Once your application is ready for deployment, use[ https://api-v1.momofin.com](#base-url) to interact with the live Momofin platform. This ensures seamless integration with real-world data and processes.

## Retrieve access token

Access token can be obtained by calling the Generate Token API. This token must be obtained before using our API. Prepare your credentials (email and password) for use with the API. You can try to retrieve the access token by pasting this to the terminal:

```bash
curl --location 'https://api-v1.momofin.com/v1/auth/login' \
--header 'Origin: $ORGANIZATION_SUBDOMAIN' \
--header 'Content-Type: application/json' \
--data '{
    "email": "$LOGIN_EMAIL",
    "password": "$LOGIN_PASSWORD",
    "remember": true
}'
```

This request queries the Login API, which in turn returns the access token for the given user. You should receive a response back that resembles the following:

```json
{
    "code": 200,
    "success": true,
    "data": {
        "token": "eyJhbGciOiJIUzI1N...",
        "refresh_token": "375f...",
        "account": {
            "fullname": "John Doe",
            "email": "john.doe@momofin.com",
            "business_id": "6e5d...",
            "is_reset": false
        },
        "activation": {
            "status": "uncomplete",
            "data": {
                "business_info": false,
                "business_detail": false,
                "personal_info": false,
                "business_documents": false,
                "email_verification": true
            }
        }
    }
}
```

The access token can be retrieved by accessing the `data.token` payload from the response. This access token will be used on every request to Momofin platform.

You can view the detailed API documentation of retrieving the access token below:

{% content-ref url="../reference/api-reference/auth/generate-access-token" %}
[generate-access-token](https://docs.momofin.com/momofin-api/reference/api-reference/auth/generate-access-token)
{% endcontent-ref %}

Now, you're ready to use Momofin API Platform.


---

# Agent Instructions: 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.momofin.com/momofin-api/quickstart/getting-started.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.
