Broker API HubMenu

OAuth 2.0 error code

OAuth 2.0 error code: insufficient_scope

As text you can copy

insufficient_scope
Kind
Error code
Where you meet it
In the error field of a reply, or in the WWW-Authenticate header
Read from
RFC 6750, The OAuth 2.0 Authorization Framework: Bearer Token Usage, section 3.1

What does insufficient_scope mean in OAuth 2.0?

The request needs higher privileges than the access token provides. The resource server should answer with HTTP 403 and may include a scope attribute naming the scope required.

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.

Independent and unofficialrfc-editor.orgchecked

What it means in trading API work

The token is valid but does not carry the permission this call needs, for example a token granted for reading that is used on an order endpoint.

This part is this site's own explanation, written for people learning to call a trading API. It is not part of the source cited above and it describes no particular broker.

What should I do about insufficient_scope?

Read the scope attribute in the WWW-Authenticate header if it is present, then obtain a token that includes that scope. A new token with the same scopes will be refused in the same way.

This page is an independent explanation in plain words. The definition itself is in the source it was read from, which is the authority if the two ever differ.