---
schema_version: "1"
id: 1f8c77ba6720b204240f60bd83b4e2b03e6448ebbdac649da6c15dac4e7610e1
title: Authenticate Your SOAP API Calls
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/guides/mc-apis/authenticate-soap-api.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/authenticate-soap-api.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 2dab76345b711364d527df3e93fc638648223c3df452cb19260d1b5d92748e6b
products:
  - Marketing Cloud Engagement APIs and Programmatic Languages
  - Marketing Cloud
---
# Authenticate Your SOAP API Calls

The first step in an API-based integration is authenticating your calls. OAuth access token authentication is the most secure way to authenticate SOAP API calls. You can also use a Marketing Cloud Engagement username and password to authenticate your calls. UsernameToken authentication isn't as secure as access token authentication.

## Authenticate with an Access Token

1.  [Get a Client ID and Secret](https://developer.salesforce.com/docs/marketing/marketing-cloud/mc-app-development/api-integration.md). Obtain a client ID and secret by creating an installed package with an API Integration component. Once you have your client ID and secret credentials, use them to acquire an OAuth access token directly from the API authentication service.

    The user for your integrated account must have the ability to administer installed packages.

2.  [Get an access token](https://developer.salesforce.com/docs/marketing/marketing-cloud/mc-app-development/create-integration-enhanced.md). Call the REST auth service to obtain an access token.

3.  Use the access token to authenticate your SOAP calls in the header. This access token authorizes calls in the account where you created the token. It doesn't flow down through child accounts.

```xml
<soap:header>
  <fueloauth>YOUR_ACCESS_TOKEN</fueloauth>
</soap:header>
```

## Authenticate with UsernameToken

1.  When setting up the user, select **API User**.

2.  For accounts with role-based permissions, select the **Role | Email | Admin | API Access | WebServices API** permission. For accounts with legacy permissions, select the **Grant the user access to the web services** permission.

3.  Enable the username and password security setting. Go to **Setup | Security | Security Settings** and find the setting under **Username and Logins**.

4.  Use the username and password to authenticate your SOAP calls in the header.

```xml
<soap:header>
  <Security
    xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
  >
    <UsernameToken>
      <Username>XXXXX</Username>
      <Password>XXXXX</Password>
    </UsernameToken>
  </Security>
</soap:header>
```
