Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: SOAP login() - Invalid Username/Password.

  1. #1
    dsandor is offline Junior Member
    Join Date
    Apr 2007
    Posts
    2

    Default SOAP login() - Invalid Username/Password.

    I am very new with SugarCRM. One of my clients wants to use it if I can integrate it via SOAP. I am impressed with the software thusfar but I am having a problem making a call to your login() method of your soap interface.

    I have visited many links before this post and they confused me even more because I heard reference to "are you using the portal soap api or normal soap api?".

    Here is what I have:

    I install the full stack SugarCRM distro to a windows server 2003 virtual machine (otherwise clean). I can login and see the SugarCRM interface. I logged in to the http://127.0.0.1/sugarcrm website as 'admin' and clicked the Admin link at the top. This link let me 'Create a User'. I called my user 'soap' with a password of 'password'. I cleared ALL the checkboxes except "Portal Only User' which from my confusing readings seems to be the security attribute I need for this user.

    So after doing this I found the soap wsdl at: http://127.0.0.1/sugarcrm/soap.php?wsdl which comes up nicely.

    I found the following article in the wiki that has a great example of calling the soap interface from c#: http://www.sugarcrm.com/wiki/index.p...SOAP_in_CSharp

    The code compiles and I set the username to my 'soap' user and set the password to 'password' (obviously sans quote). I get an error 10 Invalid username/password. I also tried my admin username and password but that generated the same error.

    So, I am at a loss. Is there some sort of attribute I have to give my user in order to allow them to use the web service api? What am I doing wrong?

    Thanks,
    David

  2. #2
    dsandor is offline Junior Member
    Join Date
    Apr 2007
    Posts
    2

    Default Re: SOAP login() - Invalid Username/Password.

    Well.. it seems the problem I was having is that I was hitting the soap services from a REMOTE machine so the http://127.0.0.1 was a differnet IP address. Is there anything I need to do in order to allow my user to connect via soap from a remote ip? or an alternative IP to which Sugar is installed?
    -Thanks

  3. #3
    rog211's Avatar
    rog211 is offline Sugar Team Member
    Join Date
    Jun 2005
    Posts
    320

    Default Re: SOAP login() - Invalid Username/Password.

    So does it work now if you hit it from a local machine?
    The other thing you need to be sure to do is md5 your password when logging in.
    Let me know.
    Rog
    Roger R. Smith
    Application Architect
    SugarCRM Inc.

  4. #4
    thierry.beeckmans is offline Sugar Community Member
    Join Date
    Feb 2007
    Posts
    55

    Default Re: SOAP login() - Invalid Username/Password.

    Quote Originally Posted by dsandor
    I have visited many links before this post and they confused me even more because I heard reference to "are you using the portal soap api or normal soap api?".
    I wasn't sure about that either.
    I found out that they probably mean that when you use the normal soap api, you don't make use of the portal functions (found in soap.php) & the portal soap api are only the functions with the portal prefix.

    A portal user (>>employee) cannot log into the sugar-part, it is only used to make the connection with soap. So the portal_login function requires an extra param besides the name and pass from the employee, the contact's portal name. Pay attention, the contact can only log in when the checkbox is active and when it's portal name is set.

    The other functions can be used in your application for the other employees (the employees with the portal user only unchecked). They log in with the normal login function.

    Hope that the clouds are fading away now
    Last edited by thierry.beeckmans; 2007-04-19 at 01:25 PM.

  5. #5
    Sugathan is offline Junior Member
    Join Date
    Aug 2007
    Posts
    1

    Default Re: SOAP login() - Invalid Username/Password.

    I am unable to login using SOAP request API of Sugram CRM .I am using a login soap request for a user account in which
    "Portal Only User" is unchecked.The request is sent using SOAP UI client

    The password is MD5 encrypted.This is the error that I get

    <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://www.sugarcrm.com/sugarcrm">
    <SOAP-ENV:Body>
    <ns1:loginResponse xmlns:ns1="http://www.sugarcrm.com/sugarcrm">
    <return xsi:type="tns:set_entry_result">
    <id xsi:type="xsd:string">-1</id>
    <error xsi:type="tns:error_value">
    <number xsi:type="xsd:string">10</number>
    <name xsi:type="xsd:string">Invalid Login</name>
    <description xsi:type="xsd:string">Login attempt failed please check the username and password</description>
    </error>
    </return>
    </ns1:loginResponse>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

    ANy help on this would be higly appreciated

  6. #6
    yuvraj10 is offline Sugar Community Member
    Join Date
    Apr 2008
    Posts
    18

    Default Re: SOAP login() - Invalid Username/Password.

    Hi All,

    I am also facing the same problem.I am using my localhost(http:\\127.0.0.1) sugarcrm WSDL which I generate from http://127.0.0.1:90/sugarcrm/soap.php?wsdl=sugarsoap the link.I am sending SOAP request of various operations (like is_admin,Login,get_entry_list etc) through 'Altova XMLspy' tool but I didn't get expected response.In most of the methods it asking a session id as input parameter but i am not able to get from where it could be found.

    the below given code showing my Request and response of sugar wsdl.
    Request:-

    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Body>
    <m:login xmlns:m="http://www.sugarcrm.com/sugarcrm" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <user_auth xsi:type="m:user_auth">
    <user_name xsi:type="xsd:string">admin</user_name>
    <password xsi:type="xsd:string">sugar1</password>
    <version xsi:type="xsd:string">5.0</version>
    </user_auth>
    <application_name xsi:type="xsd:string">sugarCRM</application_name>
    </m:login>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>




    Response:-

    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://www.sugarcrm.com/sugarcrm">
    <SOAP-ENV:Body>
    <ns1:loginResponse xmlns:ns1="http://www.sugarcrm.com/sugarcrm">
    <return xsi:type="tns:set_entry_result">
    <id xsi:type="xsd:string">-1</id>
    <error xsi:type="tns:error_value">
    <number xsi:type="xsd:string">10</number>
    <name xsi:type="xsd:string">Invalid Login</name>
    <description xsi:type="xsd:string">Login attempt failed please check the username and password</description>
    </error>
    </return>
    </ns1:loginResponse>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

    Kindly help me if anyone have some idea how we can call sugarwsdl from external tool?

  7. #7
    rog211's Avatar
    rog211 is offline Sugar Team Member
    Join Date
    Jun 2005
    Posts
    320

    Default Re: SOAP login() - Invalid Username/Password.

    You must md5 the password before calling login. The md5 of your password: sugar1 would be: 4bfcddb556b714d263894448435b02a1

    Give that a try and see if it helps.
    -Rog
    Roger R. Smith
    Application Architect
    SugarCRM Inc.

  8. #8
    nishit is offline Junior Member
    Join Date
    May 2008
    Posts
    1

    Default Re: SOAP login() - Invalid Username/Password.

    Hi all,
    i am working on linux os and java ..... trying to login but its throwing an error for application_name where to get the application name?
    its throwing an error for this part of code: loginRes.getError().getNumber().
    and the error is error:10 and session id:-1 please do help out...
    The user name and password are verified...

    Thanks
    Last edited by nishit; 2008-05-26 at 10:24 AM.

  9. #9
    vdatla is offline Junior Member
    Join Date
    Jun 2008
    Posts
    2

    Default Re: SOAP login() - Invalid Username/Password.

    i have given the md5 pass word but still cannot login

    please let me know the following information:

    version: What does this parameter mean,is the version of the sugar we have installed,or something else?

  10. #10
    rus
    rus is offline Sugar Community Member
    Join Date
    Mar 2008
    Posts
    37

    Default Re: SOAP login() - Invalid Username/Password.

    I also have the same problems .. Is there any solution yet ??
    I try the SOAP in C# example and I succeeded pass the function Authenticate (call the login function), but when I want to call get_entry_list function, it always get the error of Invalid Username/Password.

    Btw, the example provide the MD5 encryption, so its not about the MD5. And I already try to encrypt "sugar1" and the result is the same.

    You can find the example that I use at : http://www.sugarcrm.com/wiki/index.p...SOAP_in_CSharp
    any suggestion will be appreciate.

    Quote Originally Posted by rog211
    You must md5 the password before calling login. The md5 of your password: sugar1 would be: 4bfcddb556b714d263894448435b02a1

    Give that a try and see if it helps.
    -Rog

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. SOAP API Login Failiure
    By myunus in forum Help
    Replies: 2
    Last Post: 2010-12-07, 09:20 AM
  2. Replies: 0
    Last Post: 2006-07-03, 09:54 AM
  3. Replies: 3
    Last Post: 2005-01-31, 11:41 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •