---
schema_version: "1"
id: 121ef8c8ede5d3a89c7481aaeec6d692bc0f0aa6b316a30a8bbcc23113b245a6
title: Using cURL
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/api-rest/guides/quickstart/quickstart-using-curl.md
canonical_url: https://developer.salesforce.com/docs/platform/api-rest/guide/quickstart-using-curl.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 3f586bb54c47b7abcd1b4883ea04255454a9d3e490dc86abffded573fd0c73fb
products:
  - REST API Developer Guide
  - Platform Developer Content
---

# Using cURL

Get to know the formatting that you can use with cURL to make requests to Salesforce. This Quick Start uses cURL examples, but you can use any tool or development environment that can make REST requests.

Familiarize yourself with cURL enough to be able to understand the examples in this guide and translate them into the tool that you’re using. To attach files containing the body of the request, you must properly format the access token. Use these tips to help you use cURL while working through the Quick Start. For more information about cURL, see [curl.se](https://curl.se/).

**Attach Request Bodies**

Many examples include request bodies—JSON or XML files that contain data for the request. When using cURL, save these files to your local system and attach them to the request using the `—data-binary` or `-d` option.

This example attaches the `new-account.json` file.

```nolang
curl https://MyDomainName.my.salesforce.com/services/data/v68.0/sobjects/Account/ -H "Authorization: Bearer 00DE0X0A0M0PeLE!AQcAQH0dMHEXAMPLEzmpkb58urFRkgeBGsxL_QJWwYMfAbUeeG7c1EXAMPLEDUkWe6H34r1AAwOR8B8fLEz6nEXAMPLE" -H "Content-Type: application/json" —d @new-account.json -X POST
```

**Handle Exclamation Marks in Access Tokens**

When you run cURL examples, you can get an error on macOS and Linux systems due to the presence of the exclamation mark (!) in OAuth access tokens. To avoid getting this error, either escape the exclamation mark or use single quotes. To escape the exclamation mark in the access token, insert a backslash before it when the access token is enclosed in double quotes.

```nolang
\!
```

For example, the access token string in this cURL command has the exclamation mark (!) escaped.

```nolang
curl https://MyDomainName.my.salesforce.com/services/data/v68.0/ -H "Authorization: Bearer 00DE0X0A0M0PeLE\!AQcAQH0dMHEXAMPLEzmpkb58urFRkgeBGsxL_QJWwYMfAbUeeG7c1EXAMPLEDUkWe6H34r1AAwOR8B8fLEz6nEXAMPLE"
```

Or, you can enclose the access token within single quotes to not escape the exclamation mark.

```nolang
curl https://MyDomainName.my.salesforce.com/services/data/v68.0/ -H 'Authorization: Bearer 00DE0X0A0M0PeLE!AQcAQH0dMHEXAMPLEzmpkb58urFRkgeBGsxL_QJWwYMfAbUeeG7c1EXAMPLEDUkWe6H34r1AAwOR8B8fLEz6nEXAMPLE'
```

**important:** All quotes, whether single or double, must be straight quotes, not curly quotes.

