• Ken Gibson 15
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
Good morning!

When I run the following command

curl https://cs52.salesforce.com/services/oauth2/token -d "grant_type=password" -d "client_id=3MVG9jfQT7vUue.HI5A55FSLlIfXBOfWf4l6bdQyHB4_Z3H8bV_itfZVmljnrsiexgKzZYSoh1lqhS4" -d "client_secret=5061899374035891170" -d "username=ken.gibson@***" -d "password=***"

I get back 

{"access_token":"00D5B000000D1Dp!AQ8AQLXPPYOY3VDQ2GBp_fw_W.kEmxxFs8wiLhhT26Q9olZ1mPb22LSha1vgSJsgV9FYtiZqAVtgorQ1KIJY","instance_url":"https://cs52.salesforce.com","id":"https://test.salesforce.com/id/00D5B000000D1DpUAK/00550000004EYRsAAO","token_type":"Bearer","issued_at":"1466180041361","signature":"pM6C2lFmEoxyz/8u+QjbEY6K23mIFE6zyBMX+8U="}

Which looks like a successful response. If I follow that immediately by 

url https://cs52.salesforce.com/services/data/v20.0/sobjects/Account/ -H 'Authorization: Bearer 00D5B000000D1Dp\!AQ8AQLY3VDQ2GBp_fw_W.kEmxxFs8wiLhhT26Q9olZ1mPA9B3geb22LShaZPaHoF1vgSJsgV9FYtiZqAVtgorQ1KIJY' -H "Content-Type: application-json" -d "@test.json"

I get

[{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}

(Please note that all tokens have been horked to post here) 

Any idea why I'm not able to request REST resources with what appears to be a valid session key? Is there a way to force it to refresh? Please note I just changed my security token this morning.

Thanks!
Good afternoon -

I'm working through the Lightning Components Developer Guide from DreamForce, and am getting an Internal Server Error when trying to Submit a new Expense. I've been through the code line-by-line, and have yet to find anything. Neither the Chrome or Firefox JS consoles show an error, and the System.debug() method around the "upsert expense; return expense;" code in the controller doesn't log anything. The error message says

An internal server error has occurred Error ID: 670155758-10800 (-1177185898)

Thanks!
Good morning!

When I run the following command

curl https://cs52.salesforce.com/services/oauth2/token -d "grant_type=password" -d "client_id=3MVG9jfQT7vUue.HI5A55FSLlIfXBOfWf4l6bdQyHB4_Z3H8bV_itfZVmljnrsiexgKzZYSoh1lqhS4" -d "client_secret=5061899374035891170" -d "username=ken.gibson@***" -d "password=***"

I get back 

{"access_token":"00D5B000000D1Dp!AQ8AQLXPPYOY3VDQ2GBp_fw_W.kEmxxFs8wiLhhT26Q9olZ1mPb22LSha1vgSJsgV9FYtiZqAVtgorQ1KIJY","instance_url":"https://cs52.salesforce.com","id":"https://test.salesforce.com/id/00D5B000000D1DpUAK/00550000004EYRsAAO","token_type":"Bearer","issued_at":"1466180041361","signature":"pM6C2lFmEoxyz/8u+QjbEY6K23mIFE6zyBMX+8U="}

Which looks like a successful response. If I follow that immediately by 

url https://cs52.salesforce.com/services/data/v20.0/sobjects/Account/ -H 'Authorization: Bearer 00D5B000000D1Dp\!AQ8AQLY3VDQ2GBp_fw_W.kEmxxFs8wiLhhT26Q9olZ1mPA9B3geb22LShaZPaHoF1vgSJsgV9FYtiZqAVtgorQ1KIJY' -H "Content-Type: application-json" -d "@test.json"

I get

[{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}

(Please note that all tokens have been horked to post here) 

Any idea why I'm not able to request REST resources with what appears to be a valid session key? Is there a way to force it to refresh? Please note I just changed my security token this morning.

Thanks!

Hi , i have created a custom VF controller which fetches some details of "Scheduled Apex Jobs" from AsyncApexJob object.

 

In My query i m not able to get the Apex job id from AsyncApex object. it Throws an error  "Job id column" does not exists in AsyncApex job object  But when i see it salesforce standard UI , i can see a column called "Job ID"in Scheduled Apex Monitor.   From  Where can i get the Apex Job Id of Scheduled Apex. Also if it is not there in AsyncApexJob object , then where(in which object) is this apex job id stored. Important point to note is  " I m just using scheduled apex and not Batch Apex." 

 

Pls help