cTrader error: URI not in the application
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.
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.
Steps
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.
help.ctrader.comchecked
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.
community.ctrader.comchecked
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.
help.ctrader.comchecked