rahultailwal Posted June 22, 2012 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, Link to comment Share on other sites More sharing options...
birbal Posted June 22, 2012 Share Posted June 22, 2012 have you come up with any code so far? did you set up your database? Link to comment Share on other sites More sharing options...
justsomeguy Posted June 22, 2012 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 Link to comment Share on other sites More sharing options...
rahultailwal Posted July 3, 2012 Author 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. Link to comment Share on other sites More sharing options...
justsomeguy Posted July 3, 2012 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 Link to comment Share on other sites More sharing options...
rahultailwal Posted July 4, 2012 Author 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. Link to comment Share on other sites More sharing options...
justsomeguy Posted July 5, 2012 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. Link to comment Share on other sites More sharing options...
rahultailwal Posted July 12, 2012 Author 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. Link to comment Share on other sites More sharing options...
birbal Posted July 12, 2012 Share Posted July 12, 2012 user dont need to get token, your application will do that authentication and get you the token Link to comment Share on other sites More sharing options...
rahultailwal Posted July 16, 2012 Author 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now