rahultailwal 8 Posted June 22, 2012 Report Share Posted June 22, 2012 Hi, I have make a form in which user will enter his salesforce username and password and the i have to login to saleforce system and get the all the contacts details. and then save to my php database. Please suggest any code for this. Thanks, Quote Link to post Share on other sites
birbal 168 Posted June 22, 2012 Report Share Posted June 22, 2012 have you come up with any code so far? did you set up your database? Quote Link to post Share on other sites
justsomeguy 1,135 Posted June 22, 2012 Report Share Posted June 22, 2012 You might want to go over their API documentation also: http://www.salesforce.com/us/developer/docs/api/index.htm Quote Link to post Share on other sites
rahultailwal 8 Posted July 3, 2012 Author Report Share Posted July 3, 2012 i have got the code php toolkit http://wiki.developerforce.com/page/PHP_Toolkit . but there is a problem that we need to login with security token. and i also want the full contact details. This quesy "Select Id, CreatedDate, Contact.Name, Contact.Email From Contact"; is for name and email but i also want address and i dont know what should be in query to fetch the address. i tried address, addresses and other column names but i dont know what is there for address. Quote Link to post Share on other sites
justsomeguy 1,135 Posted July 3, 2012 Report Share Posted July 3, 2012 but there is a problem that we need to login with security token.Why is that a problem? i dont know what should be in query to fetch the address. i tried address, addresses and other column names but i dont know what is there for address.Well, I guess your options are to keep guessing, or check the documentation. http://wiki.develope...m/page/Database If they support it, you can also use a SHOW COLUMNS query to get the column information for a table. http://dev.mysql.com/doc/refman/5.0/en/show-columns.html Quote Link to post Share on other sites
rahultailwal 8 Posted July 4, 2012 Author Report Share Posted July 4, 2012 Thanks for reply. "but there is a problem that we need to login with security token." Here if we are login using our php script then it requires a security token after password filed. And i dont want this user will only provide his password. You can download and run the partner.php script and can see what is there for password. http://wiki.develope...age/PHP_Toolkit 2. Show columns query is not working for salesforce. Quote Link to post Share on other sites
justsomeguy 1,135 Posted July 5, 2012 Report Share Posted July 5, 2012 If this is the file you're referring to: https://github.com/developerforce/Force.com-Toolkit-for-PHP/blob/master/test/partner.php I don't see a security token there, only a username and password. Regardless, if Salesforce requires you to use a security token or whatever else to access their service that's not something you can change. You need to follow their rules. With regard to the database structure, that will be in the documentation somewhere. They have to have their database structure published if they expect people to query the database directly. Quote Link to post Share on other sites
rahultailwal 8 Posted July 12, 2012 Author Report Share Posted July 12, 2012 Yes there is nothing about token but if you see this file https://github.com/developerforce/Force.com-Toolkit-for-PHP/blob/master/samples/userAuth.php here u can see that a security token is required for authentication. If you run the partner.php then u will get error because u need to put security token for it. and no user would want to go to salesforce and generate a security token and then come to my site and login. Quote Link to post Share on other sites
birbal 168 Posted July 12, 2012 Report Share Posted July 12, 2012 user dont need to get token, your application will do that authentication and get you the token Quote Link to post Share on other sites
rahultailwal 8 Posted July 16, 2012 Author Report Share Posted July 16, 2012 this token is for individual account not like a super account so that i can use it for all. thats the problem Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.