Sample Open API not able to authorize

Created at 28 Feb 2020, 05:37
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
AC

acrigney

Joined 25.05.2017

Sample Open API not able to authorize
28 Feb 2020, 05:37


Hi Guys,

                  After using the sample app for a few hours I now am unable to get a response from the Authorization request.

I tried getting new account and trading tokens but no luck.

Send: ProtoMessage{AppAuthRequest{clientId:496_vI2DH0hQustu5QVfgvrAzjfXABcOsMjxvZ5CdS5YJJFPrGsgp7, clientSecret:Tp3VYWgbIE5QPbLNlVvdzVZf8v4RZ5uznovfOFJvHJHueqQuDo}}

But no response is received

Best Regards,

                        Alistair

 

 


@acrigney
Replies

PanagiotisCharalampous
28 Feb 2020, 08:37

Hi acrigney,

I just tried this and I see no issues. Please make sure everything is correct.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

acrigney
28 Feb 2020, 09:23 ( Updated at: 21 Dec 2023, 09:21 )

RE:

Still no luck mate, I have not changed the code and I had checked it in before so I can see if there are any changes, I had created new tokens and I checked the old tokens that worked before but its not working now.

PanagiotisCharalampous said:

Hi acrigney,

I just tried this and I see no issues. Please make sure everything is correct.

Best Regards,

Panagiotis 

Join us on Telegram

 

 


@acrigney

PanagiotisCharalampous
28 Feb 2020, 09:27

Hi acrigney,

Please send the client ID, client Secret, token and host in text format at community@spotware.com so that I can check.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

acrigney
28 Feb 2020, 09:35

RE:

I emailed you my main.cs file.

PanagiotisCharalampous said:

Hi acrigney,

Please send the client ID, client Secret, token and host in text format at community@spotware.com so that I can check.

Best Regards,

Panagiotis 

Join us on Telegram

 

 


@acrigney

PanagiotisCharalampous
28 Feb 2020, 09:44

Hi acrigney,

I tested your token and seems fine to me

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

acrigney
28 Feb 2020, 09:51 ( Updated at: 21 Dec 2023, 09:21 )

RE:

Weird mate! must be something wrong with my machine, I rebooted before I will try that again.

PanagiotisCharalampous said:

Hi acrigney,

I tested your token and seems fine to me

Best Regards,

Panagiotis 

Join us on Telegram

 


@acrigney

acrigney
04 Mar 2020, 13:00 ( Updated at: 21 Dec 2023, 09:21 )

RE: RE:

acrigney said:The problem was that I added this statement to the listen function that was causing it to crash

var type = String.Format("Received: " + OpenApiMessagesPresentation.ToString(protoMessage));

The error is "Input string was not in a correct format." I don't see why this doesn't work.

Weird mate! must be something wrong with my machine, I rebooted before I will try that again.

PanagiotisCharalampous said:

Hi acrigney,

I tested your token and seems fine to me

Best Regards,

Panagiotis 

Join us on Telegram

 

 


@acrigney

PanagiotisCharalampous
04 Mar 2020, 15:14

Hi acrigney,

Change it to the below

 var type = "Received: " + OpenApiMessagesPresentation.ToString(protoMessage);

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

acrigney
05 Mar 2020, 00:48

RE:

Actually mate that had didn't work, have to look if I really need this or not.

PanagiotisCharalampous said:

Hi acrigney,

Change it to the below

 var type = "Received: " + OpenApiMessagesPresentation.ToString(protoMessage);

Best Regards,

Panagiotis 

Join us on Telegram

 


@acrigney