• Krati Rajpurohit
  • NEWBIE
  • 5 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
Hey
can anyone suggest me a appropriate way via which i can update all my Lead records in single request .
I using java, and wana pass all records as json string
Is  there any technique is salesforce using which a json string with all records can be updated in a single request
Hey
 Getting "error":"invalid_client","error_description":"invalid client credentials" while trying to get auth code.
Done with the Permission setting and Ip address setting. Im able to generate auth code via curl call but not programatically.Please guide me

    private Client client = JerseyClientBuilder.newClient();
    private String clientId="3MVG9ZL0ppGP5UrBtzV375FzNEKv4M0YHXq47vVM8O3rYjXp1VkxmcTRA_mpzUYB6vtedwwGS.3AG6lsiIODA";
    private String redirecturi="https://localhost:8080/test/xypress-web/";
    
    private void makeAuthCodeRequest()  {
        String username="k**0009@gmail.com";
        String password="*******";
        String LoginInstance="'https://login.salesforce.com";
        
        String apiVersion ="";
        //String consumerKey="";
        String secretKey="*********";
        String granttype="password";
        
        String jsonString="";
        try {
        PostMethod post = new PostMethod("https://login.salesforce.com/services/oauth2/token");
        post.addParameter("grant_type",granttype);
            post.addParameter("client_id",clientId);
            post.addParameter("client_secret",secretKey);
            post.addParameter("username",username);
            post.addParameter("PASSWORD",password);
            post.addParameter("redirect_uri",redirecturi);
            HttpClient httpclient = new HttpClient();
            httpclient.executeMethod(post);
            String postResp = post.getResponseBodyAsString().toString();
           
        } catch (Exception e) {
            e.printStackTrace();
            
        }   
Hey
can anyone suggest me a appropriate way via which i can update all my Lead records in single request .
I using java, and wana pass all records as json string
Is  there any technique is salesforce using which a json string with all records can be updated in a single request

I am following the guidelines from the Chatter guide and somehow I can't get the OAuth to work. 

 

It's not working from Java or curl.   Here is what I am doing:

 

mike$ curl --form client_id=3MVG9yZ.WNe6bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxu5AjB4oT9kxi8SEhY --form client_secret=26542xxxxxxxxxxx78  --form grant_type=password --form username=xxxxxxxx@gmail.com --form password=xxxxxxx https://na11.salesforce.com/services/oauth2/token

 

What I am getting is:

{"error":"invalid_grant","error_description":"authentication failure - Invalid Password"}

 

I double checked and I am getting into na11 with the right password.  Is there anything else I need to do?

 

Here are the settings in my remote access:

 



Applicationchatter



Callback URLhttps://na11.salesforce.com/ConnectTest/oauth/_callback /// temp one



No user approval required for users in this organizationNot Checked