Advertisement
Guest User

Untitled

a guest
Jul 18th, 2016
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. curl https://cs22.salesforce.com/services/oauth2/token -H "application/x-www-form-urlencoded" -d "grant_type=password" -d "client_id=xxx" -d "client_secret=1xxx" -d "username=user@force.com" -d "password=xxxx"
  2.  
  3. {"access_token":"accessTokenYYY","instance_url":"https://ap1.salesforce.com","id":"https://test.salesforce.com/id/xx","token_type":"Bearer","issued_at":"246890548714","signature":"GGfz/veli2sBM="}
  4.  
  5. curl "https://ap1.salesforce.com/services/data/v20.0/sobjects/Contact/" -H "Authorization: Bearer accessTokenYYY" -H "Content-Type: application/json; charset=UTF-8" -d '{"lastname": "Smith", "email": "smith@force.com"}'
  6.  
  7. [{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement