function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Devang Rana 6Devang Rana 6 

i have problem in curl api

hello every one i m new in API development i m trying to run this CURL
this is my url  
    
curl https://technosoft-dev-ed.my.salesforce.com/services/data/v20.0/ -H "Authorization: Bearer access_token" -H "X-PrettyPrint:1"

And this is my json response.

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


plz help me and guid me what i should i do.
NagendraNagendra (Salesforce Developers) 
Hi Devang Rana 6,

Please try the below code snippet
curl https://technosoft-dev-ed.my.salesforce.com/services/data/v20.0/ -H "Authorization: "Bearer access_token" -H "X-PrettyPrint:1"

Please let me know if this helps you.

Best Regards,
Nagendra.P
Devang Rana 6Devang Rana 6
Hello Nagendra.P
I get this problem as per your suggestion i  try this. but not able to do. plz any suggestion?
[{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}]curl: (6) Could not resolve host: access_token -H X-PrettyPrint