I am a front-end dev trying to hook a salesforce api to one of my apps.
For practice (yesterday) I created a new connected app and used the below to fetch some data and it worked
curl https://tahina-test2-dev-ed.my.salesforce.com/services/data/v20.0/sobjects/Order/8012Xff0004qzjPQAQ?fields=Status -H 'Authorization: Bearer 00D2X000001bhbhlTPnqeFBF7WSQdKKX9nKdr_oyTpajKccG5EZ03jtJJu7BS2tv2oLWhuwrc2V9WOv3tuOFHyJ0cuq8PA4rn1' -H "X-PrettyPrint:1"
But today this below error when i try to fetch the data with the same curl request
[{
"message": "Session expired or invalid",
"errorCode": "INVALID_SESSION_ID"
}]
can anyone help me understand how to avoid this and keep fetching my data as yesterday?