The OAuth authorization code flow succeeds and access_token is returned with token_type=Bearer and valid expires_in.
However, an immediate POST request to https://www.mql5.com/api/oauth/user_info with the fresh access_token returns error 103: "Access token is invalid because the user is not authorized".
GET requests return HTML 404 instead of JSON API response.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
@MetaQuotes
The OAuth authorization code flow succeeds and access_token is returned with token_type=Bearer and valid expires_in.
However, an immediate POST request to https://www.mql5.com/api/oauth/user_info with the fresh access_token returns error 103: "Access token is invalid because the user is not authorized".
GET requests return HTML 404 instead of JSON API response.
Hello!
To use /api/oauth/user_info endpoint please specify "client_id" parameter in your request.
Hello!
To use /api/oauth/user_info endpoint please specify "client_id" parameter in your request.
Thank you very much.
Yes, that was my mistake.
The current MQL5 router already passes client_id to the authorization URL and token exchange, but it really wasn't passed to user_info
Thank you - everything works!