OANDA API key: how to get your Account ID and Access Token
Autoview turns a webhook from any system that can send one into an order at OANDA. To do that it needs two values from your OANDA account: an Account ID and an Access Token. OANDA doesn't use a key and secret pair. The token is a single value OANDA calls a personal access token.
This page covers where to get both values and where each one goes on Autoview's connect form. Every OANDA step below was checked against OANDA's own help center and API docs on October 6, 2026.
Start on OANDA Practice
Connect a practice (demo) account first. It trades demo funds, and the OANDA Practice connection costs nothing on Autoview. Its connect form is /account/setup/oanda_practice/. The live form is /account/setup/oanda/. Both ask for the same two fields.
Practice and live are separate environments at OANDA. Each has its own Account ID, and you generate each token while signed in to that environment. So get both values from the same place: practice with practice, live with live. If you don't have a practice account yet, the OANDA Practice guide shows how to open one.
Prefer to watch it first? Our OANDA Practice video connects a Practice account to Autoview, writes a market buy on EUR_USD, dry-runs it with d=1, and checks the result in webhook history. It runs about eight minutes: watch the OANDA Practice walkthrough on YouTube.
Generate the token in OANDA's Hub
OANDA's help center gives these steps:
- Sign in to your practice or live account at hub.oanda.com. Pick the one you want to connect.
- At the top, click Tools, then API.
- Click Generate.
- Copy the token right away and keep it somewhere safe.
OANDA's developer docs also name a Manage API Access link under My Account, then My Services. Autoview's form links straight to hub.oanda.com/tpa/personal_token. If OANDA has moved the menu, check its current Hub page.
OANDA shows the token once and does not keep a copy. If you lose it, click Revoke in the same place and generate a new one. Then paste the new token into Autoview, because anything still using the old token stops working.
Treat the token like a password. OANDA's docs say a token grants access to all of your sub-accounts, not just one.
Find your Account ID
In the Hub, click Accounts in the left menu, then the account you want. The number next to v20 Account Number is your Account ID. It has four groups split by dashes, in the format xxx-xxx-xxxxxxx-xxx, for example 001-001-1234567-001.
If you have sub-accounts, pick the one you want Autoview to trade. The token works for all of them, so the Account ID is what decides which one gets the orders.
Autoview connects through OANDA's v20 API. An account on MetaTrader 4 only won't work here. Use an fxTrade account, practice or live.
Permissions: what the token can do
OANDA's docs describe no permission boxes for a personal token. You won't be asked to tick trading or reading. There is nothing to switch off for withdrawals either: the endpoints in OANDA's v20 API cover accounts, orders, trades, positions, transactions and pricing, and none of them moves money out of your account.
Autoview uses the token for these calls only:
- Read your account details and current prices.
- Place, change and cancel orders.
- Read your open orders and positions, including open trades.
More on how Autoview stores credentials: Are my API keys safe?
IP whitelisting
OANDA's token and API docs, as checked for this page, describe no IP restriction for a personal access token. So there is no IP step on OANDA's side, and you can leave it alone.
If OANDA's current page does offer an IP restriction and you want to use it, Autoview publishes its zone addresses on Are my API keys safe? Ask support which zone your account runs on before you lock the token to one address. A wrong address makes orders fail.
Which value goes in which field
Step 1 of the OANDA connect form asks for these, in this order:
| Autoview field | What to paste |
|---|---|
| *Account ID | Your v20 Account Number from the Hub, such as 001-001-1234567-001 |
| *Access Token | The personal access token you generated |
| *Zone | Pick one from the list. It sets where your commands run. |
Then click Add API Keys. The form moves on to Step 2, where you link a webhook. The Getting started with OANDA guide covers that part and your first test order.
Common errors
- "Insufficient authorization to perform request." OANDA returns this when the token is wrong or comes from the other environment. Check that you chose OANDA Practice on Autoview for a practice token, and OANDA for a live one. Look for a stray space when you pasted. If the token was lost or revoked, generate a new one.
- "The provided request was forbidden." OANDA uses this for a bad Account ID. Copy it again from v20 Account Number, dashes included, and make sure it comes from the same environment as the token.
- The token page shows nothing to copy. OANDA only shows a token once. Revoke it and generate a new one.
- The account can't trade. OANDA can also return "Insufficient authorization" when an account is not tradable. If the token and ID are right, contact OANDA support.
For order and symbol errors after you are connected, see the OANDA command reference and common error messages.