# cTrader error: URI not in the application

Independent and unofficial. Not affiliated with or endorsed by any broker or platform named here. Educational only: nothing here is advice, and nothing here recommends a broker or a trade.

This is the markdown version of https://openbrokerapi.com/guides/ctrader-redirect-uri-not-registered, written from the same records as that page.

Risk warning: CFDs and spread bets are complex instruments and come with a high risk of losing money rapidly due to leverage. You can lose money on these products, and each provider publishes its own loss figure under FCA rules. You should consider whether you understand how they work and whether you can afford to take the high risk of losing your money. Automated and API trading can amplify losses through bugs, connectivity failures and runaway orders.

What the cTrader Open API message Error authenticating application: Provided application does not contain provided URI means, from Spotware's own authentication page and the one public thread that records it, both read on 30 November 2026. The redirect URI in your authorisation request has to be one already registered against your application.

- Checked: 2026-11-30
- For: Anyone whose cTrader Open API authorisation stops at the message Provided application does not contain provided URI
- About: [cTrader Open API](https://openbrokerapi.com/platforms/ctrader)

## Steps

### 1. What the authentication page requires of the redirect URI

Spotware's App and account authentication page says the redirect_uri parameter of an authorisation request must be a valid redirect URI specified in the settings of your application, that you can add an unlimited number of redirect URIs if required, and that the Playground's redirect URI must never be used for a production application. Redirect URIs are edited on the Applications page of the Open API portal, through the Edit button for the application. The same page describes the flow: an authorisation code with a one minute lifetime is exchanged for an access token that lasts 2,628,000 seconds, about 30 days, and the refresh token has no expiry.

Status: verified. Source: [help.ctrader.com](https://help.ctrader.com/open-api/account-authentication/), checked 2026-11-30.

### 2. The thread that records the message, and its answer

On the cTrader community forum a user posted on 9 May 2021 that after allowing access to a trading account they received Error authenticating application: Provided application does not contain provided URI, using 127.0.0.1 as the redirect URI with a sample application that chose a random port. A Spotware staff reply on 10 May 2021 said the redirect URI has to be added to the Open API application's redirect URIs list first, and on 11 May 2021 that a colon can specify the port and pointed to Spotware's OpenAPI.Net samples on GitHub. The asker confirmed on 11 May 2021 that it worked with a specified port. Whether a port chosen at random at run time can ever match is not answered on the thread: a registered URI names one port, so register the port you will listen on and use that one.

Status: verified. Source: [community.ctrader.com](https://community.ctrader.com/forum/connect-api-support/36016/), checked 2026-11-30.

### 3. What to check in your own application

Open the application on the Applications page of the Open API portal and compare its redirect URIs, character for character, with the redirect_uri your code sends: scheme, host, port and path all count. If your code picks a loopback port at run time, fix the port and register that exact address. The message is produced before any trading account is reached, so it is not about account permissions or scopes; the accounts and trading scopes on the authentication page decide what a token may do after this step succeeds. This page has not reproduced the message against a live application, so it records what the two pages above say and nothing more.

Status: verified. Source: [help.ctrader.com](https://help.ctrader.com/open-api/account-authentication/), checked 2026-11-30.

## Sources

- Status: verified. Source: [cTrader Open API: app and account authentication](https://help.ctrader.com/open-api/account-authentication/), checked 2026-11-30.
- Status: verified. Source: [cTrader community forum thread 36016, Connect API support](https://community.ctrader.com/forum/connect-api-support/36016/), checked 2026-11-30.

## More on the cTrader API

- [cTrader API quickstart](https://openbrokerapi.com/platforms/ctrader/quickstart): From credentials to a first call on a demo account, step by step.
- [cTrader API error codes](https://openbrokerapi.com/errors/ctrader): 53 decoded, each with what it means, and the fix where the source gives one.
- [cTrader messages](https://openbrokerapi.com/platforms/ctrader/messages): 49 documented, each with its fields and source.
- [cTrader API page](https://openbrokerapi.com/platforms/ctrader): The full record: access, authentication, limits and the source for each.
- [cTrader Open API with Python](https://openbrokerapi.com/guides/ctrader-open-api-python): Guide

## Licence and how to cite

The records behind this page are all rights reserved. This file is the page itself, at its own address, in another format. It is not part of the CC BY 4.0 downloads listed at https://openbrokerapi.com/data. Quote from it with a link to the page.

Cite as: cTrader error: URI not in the application. Broker API Hub, https://openbrokerapi.com/guides/ctrader-redirect-uri-not-registered, newest check 2026-11-30.

Where you rely on a single figure, cite the source and the checked date printed beside it as well. Where this page and a broker's own documentation differ, the documentation wins.
