getting Metaquote ID by coding

 

We know that Metaquote ID is unique to our mobile device. We are able to receive push notifications of trade activities on mobile app. And this ID should be get from mobile installation and entered in terminal's Options menu.

What I am looking for is getting this ID using mql5 coding and putting it in a variable.

I don't know where it is saved or what function/library/dll/API can get this ID.

Thanks


 

Hello Yashar Safarzadeh .

You can consult this list of available variables :  

"TERMINAL_MQID"  is a bool that will indicate a user has connected their terminal to an mqid ,and if so you can use then the SendNotification to send a message to that device.

You dont actually need to check for mqid , the SendNotification does it for you.

TERMINAL_MQID : https://www.mql5.com/en/docs/constants/environment_state/terminalstatus

Send Notification : https://www.mql5.com/en/docs/network/sendnotification

 
Lorentzos Roussos:

Hello Yashar Safarzadeh .

You can consult this list of available variables :  

"TERMINAL_MQID"  is a bool that will indicate a user has connected their terminal to an mqid ,and if so you can use then the SendNotification to send a message to that device.

You dont actually need to check for mqid , the SendNotification does it for you.

TERMINAL_MQID : https://www.mql5.com/en/docs/constants/environment_state/terminalstatus

Send Notification : https://www.mql5.com/en/docs/network/sendnotification

Thank you for response and checking the available codes.

But As you said SendNotification checks the status, and what I need is the ID itself.

 
Yashar Safarzadeh:

Thank you for response and checking the available codes.

But As you said SendNotification checks the status, and what I need is the ID itself.

Why do you need the ID ?

do you want to perform profile checks ? i think they have a login api for that .if i recall.

yes go there : https://www.mql5.com/en/users/fhghjy2323fu/apps

 
Yashar Safarzadeh:
For security and authentication reasons.

So you have your own app as well or a web app ?

No you dont have an app you would have access to their phone number.

So you want to make sure the person that connects to your website via the terminal is who they say they are

 
Yashar Safarzadeh:

by having this solved, I don't need any other mobile app, However I would develop a web app.

I understand . So how do your users make first contact -with your server- ? from the desktop terminal ?

 
Yashar Safarzadeh:

Users first contact from web app.

Okay , and they give you a name , and account id ? 

 
Yashar Safarzadeh:
Users don't need to give me anything. My coding will send all user's info to the web app, If they change later the web app will notify me.

aha .so they first contact the server from the terminal. 

A license control ,thats what you want ?  you dont need the MQID for that .

 
Yashar Safarzadeh:

I need MQID verification so that just that user be able to get notifications not the others.

You dont need to verify it , if they add it on their terminal ,its theirs ,they are the only ones who get notifications.

If you dont have a native android/ios app for notifying them ,you can have your mt4/mt5 program receive notifications from your server and send them to their mobile terminal-offcourse they must have connected their mqid to the mt4/mt5 on the desktop.

If you have a native mobile app it gets data from your server to connect ,so, it can lookup their notifications directly -from your notification system not metatraders-

 
Yashar Safarzadeh:

They can change the ID every time they want and put other IDs,that's not my favorite. While mobile verification is important for me.

And I am not looking for developing a separate mobile app when the Meta-Trader's mobile app is working nice.

Thank you anyway for sharing your opinion.

MQID can change too . You are welcome

 
Yashar Safarzadeh:

Ok,

Dear Lorentzos for focusing others the main topic, I would delete our discussion.

no problem :)

Reason: