API Support Forum
OEC API > API Support > Login failed with correct login data using
Author Topic: Login failed with correct login data using
(2 messages, Page 1 of 1)
Moderators: VPfau
CChen15
Posts: 121
Joined: Jul 23, 2009


Posted: Nov 01, 2009 @ 07:29 AM             Msg. 1 of 2
Hello.

On testing original non modified version of "Sample COM Book.xls" and using real Login-Password combination I get "Login Failed: InvalidUserOrPassword".

Trying demo Lg-Pw connect is proceeding w/o any errors. In both cases I did not typed, but used copy-paste. Also in both cases OEC Trader wasn't loaded at all.

What am I doing wrong again?

.

P.S. Solved.
The "Host" parameter of Connect(Host As String, Port As Long, UserName As String, Password As String, AutoReconnect As Boolean) did not changed from demo server to live.
.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Chen Hua, Russia

Edited by CChen15 on Nov 1, 2009 at 09:19:13
SShah5
Posts: 9
Joined: Aug 25, 2008


Posted: Jan 19, 2010 @ 06:07 PM             Msg. 2 of 2
Did you change the Server in Sub Connect?

Default is
Server = "api.openecry.com"
Try
Server = "prod.openecry.com"
or
Server = "sim.openecry.com" for the demo

verify port...


Public Sub Connect(Name As String, Pass As String, Reconnect As Boolean)
On Error GoTo Err

If c Is Nothing Then
'Set c = New OECAPICOM.OECClient
Server = "sim.openecry.com"
End If
c.Connect Server, 9200, Name, Pass, Reconnect

Exit Sub
Err:
MsgBox Err.Description
End Sub