I write a visualforce page with code
<apex:page >
<apex:outputText >{!$Api.Session_ID} </apex:outputText>
</apex:page>
i copied the session Id.and used curl and run the command
curl --header "Authorization : Bearer 00D90000000oX2G!AR8AQF4bfKL.F59U3YiDpt3WY5McM6lhzPhoQzTgkpuBUi1gbEMFXlWgCfq4QmufGh.Zw.VlGN4HCCG0S93qlcy671cQ6xcG" https://mydevorg-dev-ed--c.salesforce.com/services/data/v29.0/
and getting error bash:
!AR8AQF4bfKL.F59U3YiDpt3WY5McM6lhzPhoQzTgkpuBUi1gbEMFXlWgCfq4QmufGh.Zw.VlGN4HCCG0S93qlcy671cQ6xcG": event not found
then I used chrome extension Advanced rest client and send the request
GET https://mydevorg-dev-ed–c.salesforce.com/services/data/v29.0/
Request Header Authorization: Bearer 00D90000000oX2G!AR8AQF4bfKL.F59U3YiDpt3WY5McM6lhzPhoQzTgkpuBUi1gbEMFXlWgCfq4QmufGh.Zw.VlGN4HCCG0S93qlcy671cQ6xcG
and I am getting no response after one minute. Can somebody tell me why I am unable to call the REST API?
Best Answer
The problem with your curl command is that bash is attempting to interpret the
!
in the session ID. Use single quotes and all will be well:Not sure what the problem is with the Chrome REST client.