How to Integrate RTK Corrections into a Robot with an API

Wheeled yard robot with two GNSS antennas and a warning beacon on a wet asphalt lot at dusk

TL;DR RTKdata's Enterprise API runs on your backend and provisions a robot's NTRIP login. The robot's client then sends its GGA position to the caster and receives RTCM corrections. Positioning success is the RTK status the receiver reports, not an API response or a login.

A new robot, asset amr-0042, has just been registered in your fleet system and needs access to RTK corrections before its first outdoor run. In GPS for robotics, that access is an NTRIP login. This RTK API integration creates the login from your backend through the RTKdata Enterprise API and hands it to the robot's existing ROS 2 stack. For the commercial context, see RTK for robotics.

How the RTK API, NTRIP Client and Receiver Work Together

An RTK API integration for robots has two separate paths. The control path runs from your backend to Enterprise API v2, a REST API that creates the robot's device license, returns its login and manages its term and status. The data path runs on the robot: its client logs in to the RTKdata caster, sends the receiver's NMEA GGA position and receives RTCM, as explained in how NTRIP carries RTCM corrections. A GNSS driver writes that RTCM into the GNSS receiver, which computes the RTK solution and passes the position to your robot software.

The API key stays on the backend. The API does not compute robot coordinates, does not carry the correction stream and does not replace the receiver.

Control path and data path of a robot RTK integration Top: your backend holds the API key and calls Enterprise API v2, which manages the device license and its credentials. Only the NTRIP username and password go from the backend to the robot. Bottom: the robot client sends GGA to the RTKdata caster on port 2101 and receives RTCM, the GNSS driver writes the RTCM into the GNSS receiver, and the receiver passes its position to the robot software. Control path: access and lifecycle, on your backend (REST API) Device licenselogin, term, status Enterprise API v2REST, Bearer key Your backendholds the API key NTRIP username and password only the API key stays on the backend Data path: corrections over NTRIP, on the robot Robot softwarelocalization stack GNSS receivercomputes RTK status GNSS driverwrites RTCM in Robot clientNTRIP, ROS 2 node RTKdata casterNTRIP, port 2101 GGA RTCM RTCM RTCM position NMEA GGA from the receiver, published by the driver on the nmea topic API success, NTRIP login and RTK FIX are three separate checks. Only the receiver reports FIX.
Two paths: the backend manages access through the REST API, while the robot exchanges GGA and RTCM with the caster over NTRIP.
LayerResponsible forNot responsible for
REST API (Enterprise API v2)Device license, login, term and status, called from your backendCorrections or position
NTRIP clientCaster login, GGA up, RTCM downWriting RTCM into the receiver; on ROS 2, the driver does that
GNSS receiver and driverApplying RTCM, computing and reporting RTK statusAccount access
Robot localization stackUsing the receiver's positionDelivering corrections

A successful API request does not establish RTK FIX, and neither does a successful NTRIP login: only the receiver reports FIX. Downstream, your stack may combine that position with other sensors, as covered in GNSS and IMU sensor fusion for robots.

What You Need Before Starting

You need an Enterprise account with API access and a robot that can already apply RTK corrections.

Prepare the Robot, Receiver and Driver

The robot needs an RTK-capable GNSS receiver, internet with outbound TCP on port 2101, and an existing ROS 2 client node. RTKdata streams RTCM 3.2 with MSM4 messages, so confirm that your receiver accepts them. The GNSS driver must take RTCM from a topic and write it into the receiver; the driver table in the ROS 2 guide shows which drivers do. For a manual receiver test first, the ROS 2 guide points to the free 30-day trial; the Enterprise API is enabled separately.

Enable the Enterprise API and Create a Test Key

RTKdata enables the Enterprise API per account on request; v2 is currently published as version 2.0.0-preview. Until it is enabled, every key answers 403 api_disabled. Create a test key (rtk_test_) under API > Keys in the portal, with only the scopes this flow uses: account:read, licenses:provision, licenses:read and credentials:read.

Provision NTRIP Access from Your Backend

In this RTK API integration, every call runs on your backend, with the test key as a Bearer token. The Enterprise API v2 guide is the definitive contract. One identity runs through every call: asset amr-0042 and the Idempotency-Key amr-0042-ntrip-login. Values are placeholders.

Read Capabilities and Select a Device Product

GET /v2/account/capabilities tells your software what the account may do right now. Check that environment is test, purchases.allowed contains create and credentialTypes.allowed contains device. Not every account may hold every credential type, and a call your contract rules out answers 409 not_available_for_account.

GET /v2/account/products then lists the products agreed for your account. Products are live terms only, so a test key always receives an empty list. In the sandbox, you create the login at the standard terms; with a live key, you use a product whose type is device, with its id as the productId, or the standard terms if your contract allows them.

# Backend only. The API key is never shipped to the robot.
curl https://enterprise.rtkdata.com/v2/account/capabilities \
  -H "Authorization: Bearer rtk_test_xxxxxxxxxxxx"

curl "https://enterprise.rtkdata.com/v2/account/products?type=device" \
  -H "Authorization: Bearer rtk_test_xxxxxxxxxxxx"

Create the Login with an Idempotent Request

POST /v2/licenses creates the device license. Send kind: "paid", a term and metadata that links the license to the robot's asset ID. With a test key, set months, as below. With a live key and a device product, send its productId instead and leave months, days and expiresAt out, because the product sets term and price. Enterprise logins belong to your account directly, with no customer record, and test runs are never billed.

curl -X POST https://enterprise.rtkdata.com/v2/licenses \
  -H "Authorization: Bearer rtk_test_xxxxxxxxxxxx" \
  -H "Idempotency-Key: amr-0042-ntrip-login" \
  -H "Content-Type: application/json" \
  -d '{
    "kind": "paid",
    "months": 1,
    "metadata": { "assetId": "amr-0042" }
  }'

Derive the Idempotency-Key from the asset and the action, not a random value per attempt. If the result is uncertain, for example a 503 outcome_unknown, repeat the identical request with the same key. A finished call replays its stored answer with Idempotency-Replayed: true, and one still running answers 409 operation_in_progress with Retry-After. Per the guide, a repeat can never create a second login or charge twice. A new key on every retry defeats that deduplication, and the same key with a different body answers 409 idempotency_key_reused. A conclusive 502 provisioning_failed bills nothing and needs a new create under a new key.

Retrieve NTRIP Credentials and Deliver Them to the Robot

The create response carries the license id and status: active means the login works, while provisioning means the create is still running or unresolved, so read GET /v2/licenses/{id} again before fetching the login. GET /v2/licenses/{id}/credentials then returns host, port, mountpoint, username, password and a setupString.

curl https://enterprise.rtkdata.com/v2/licenses/lic_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/credentials \
  -H "Authorization: Bearer rtk_test_xxxxxxxxxxxx"

Deliver only these NTRIP credentials to the robot through your existing configuration channel; the administrative API key never goes into robot software or a public client app.

Connect the Robot and Verify the Correction Stream

On ROS 2, pass the values to the existing client through its parameter file instead of writing a new one; the ROS 2 NTRIP client setup covers installation, drivers and launch files. Take host, port and mountpoint from the credentials response. The ROS 2 guide documents the regional hosts rtk.rtkdata.com (North America), eu.rtkdata.com (Europe) and aus.rtkdata.com (Australia), port 2101 and the AUTO mountpoint.

# ~/rtkdata_ntrip.yaml, filled from GET /v2/licenses/{id}/credentials (live license)
ntrip_client:
  ros__parameters:
    host: eu.rtkdata.com        # ROS 2 guide example; use the host from your credentials
    port: 2101                  # use the port from your credentials
    mountpoint: AUTO            # ROS 2 guide example; use the mountpoint from your credentials
    authenticate: true
    username: '<username>'      # keep the quotes
    password: '<password>'      # keep the quotes
    rtcm_message_package: rtcm_msgs
    nmea_max_length: 128
    rtcm_timeout_seconds: 15

Start the GNSS driver first and wait for a position. The client forwards the receiver's GGA from the nmea topic to the caster, and AUTO uses it to select the nearest reference station. Without GGA, the log still shows Connected to ... but no RTK corrections arrive. Corrections come back on the rtcm topic, and the GNSS driver must write them into the receiver.

Verify in this order: the login line in the log, GGA on /nmea, the driver subscribed to /rtcm, data on /rtcm, and finally the RTK status the driver reports, such as status.status: 2 on /ublox_gps_node/fix with ublox_gps. The /rtcm rate is not a target value and does not prove that the receiver uses the data.

SymptomStatus layerWhat to check
The API refuses a callProvisioning status (REST API)The error code, such as api_disabled, insufficient_scope or product_not_found
Login succeeds, nothing on /rtcmNTRIP stream statusWhether GGA reaches the caster, then coverage at the robot's location
Data on /rtcm, no RTK FIXReceiver FIX statusWhether a driver with RTCM input subscribes to /rtcm, and which constellations it enables

Move from Sandbox to the First Live Deployment

The sandbox proves your workflow, not your RTK positioning. Test credentials are valid in shape but never connect to the real caster, and an id from the other environment answers 404.

For the first live robot, create a live key (rtk_live_) with the same scopes and an expiry or IP allowlist, then run the same flow; live licenses are billed. Take the robot outdoors with its real receiver and accept the result only when the receiver reports FIX. The license's firstConnectionAt shows what the caster has seen of the login: a provider-side observation, not receiver telemetry.

Each robot connected at the same time needs its own data stream. A later guide in this series covers fleet capacity and recurring operations.

FAQ

Does the RTKdata API return my robot's precise coordinates?

Not as a positioning output. The Enterprise API manages access: device licenses, logins, terms and status. The robot's GNSS receiver computes the position from satellite signals and RTCM corrections, and your localization stack consumes it. Session endpoints such as GET /v2/sessions/live do show a position and a fixed or float state for open connections, but that is what the caster has seen: provider-side data, not an input for navigation.

Can a robot receive RTK corrections through REST instead of NTRIP?

No. RTKdata is a GNSS correction service that delivers RTCM over NTRIP: the robot's client logs in to the caster on port 2101 and sends its GGA position. The REST API creates and manages that login but does not carry the correction stream.

Can I verify RTK FIX with sandbox credentials?

No. Test credentials are valid in shape but never connect to the caster, so no corrections flow. The sandbox verifies your provisioning workflow and error handling. RTK FIX needs a live license, a real receiver outdoors and the status that receiver reports.

Do I need to write my own NTRIP client for a ROS 2 robot?

No. RTKdata documents a setup for an existing open-source ROS 2 package, version 1.4.1, on Humble and Jazzy. You give it the host, port, mountpoint, username and password, and pair it with a GNSS driver that writes RTCM into the receiver.

Sources (retrieved 23 November 2026): Enterprise API overview; Enterprise API v2 guide; Enterprise OpenAPI schema, version 2.0.0-preview; Enterprise API v2 error catalogue; RTKdata ROS 2 guide.

Konstantin Nidens

Konstantin Nidens · Co-Founder & CMO at RTKdata

Leads marketing, growth, and customer-facing communication at RTKdata and builds the demand engine across paid, content, and outreach.

Share the Post: