OAuth2 访问令牌和服务列表

要获得 OAuth2 访问令牌,只需执行
curl https://login.salesforce.com/services/oauth2/token -d "grant_type=password" -d "client_id=myclientid" -d "client_secret=myclientsecret" -d "username=mylogin@salesforce.com" -d "password=mypassword123456" 即可

你应该得到类似的回应

{
  "access_token": "00D6F0xxx001g1qs!ARsAQL7BRiQQ0lgTW7zXu3kILJBxxxxxHvDnChF2ETBFJpX0T2LsBsm8MVABhAvINAyZqgDIAHhJDp6QjuF6ZAYFE",
  "instance_url": "https://ap4.salesforce.com",
  "id": "https://login.salesforce.com/id/00D6F000001xxxxAA/0056F000006DMcxxxx",
  "token_type": "Bearer",
  "issued_at": "14878401xxxxx",
  "signature": "Ra5Sdm6gq4xxxeZYk3H2yBIVpZ6hBUDgkQ4Tjp9Q="
}

然后做

{
  "tooling": "/services/data/v20.0/tooling",
  "eclair": "/services/data/v20.0/eclair",
  "prechatForms": "/services/data/v20.0/prechatForms",
  "async-queries": "/services/data/v20.0/async-queries",
  "query": "/services/data/v20.0/query",
  "chatter": "/services/data/v20.0/chatter",
  "wave": "/services/data/v20.0/wave",
  "search": "/services/data/v20.0/search",
  "identity": "https://login.salesforce.com/id/00D6F000001g1qsUAA/0056F000006DMcMQAW",
  "sobjects": "/services/data/v20.0/sobjects",
  "serviceTemplates": "/services/data/v20.0/serviceTemplates",
  "recent": "/services/data/v20.0/recent",
  "connect": "/services/data/v20.0/connect",
  "licensing": "/services/data/v20.0/licensing"
}