# Build on Lotus

Lotus offers the full feature set of its capabilities through a comprehensive JSON-RPC API. Both the Lotus Node and the Lotus Miner applications expose APIs (which overlap in some parts). These APIs listen on a local port and perform authorization of every request using JWT tokens.

If you wish to interact with the Lotus Node API, you will need to either:

# Getting started with Lotus APIs

  1. Decide how you want to run Lotus:

    There are several options depending on your needs:

    You can also use Glif node. The steps below apply when running your own Lotus daemon.

  2. Enable remote API access for your Lotus node:

    By default, your Lotus daemon and Lotus Miner do not support remote API access, as they are configured to listen only to local requests. You will need to edit the configuration to listen on a public interface.

    This is explained here. Additionally, you want to ensure that your node is reachable from the outside. We have a connectivity guide (opens new window) for miners with some tips that also apply to normal, non-miner nodes.

  3. Obtain a token:

    The API authenticates requests using a JWT token. Lotus (and Lotus Miner) provide tokens with different scopes: read, write, sign and admin. The procedure to obtain the tokens is explained here.

    The token can be used to configure lotus to talk to any remote lotus daemon:

    # The following will make lotus make requests against lotus_endpoint,
    # rather than against the local-running daemon.
    export FULLNODE_API_INFO=<token>:<lotus_endpoint>
    lotus net id

    You can use this to test that your API endpoint is reachable and works well.

  4. Start using the JSON-API

    Learn how the JSON-RPC API works, where to contact it and how to obtain documentation for every method in the reference.

    This will allow you to become familiar with how the API operates. From that point, you can start leveraging any of the existing client libraries or writing your own!