Obtain a Salesforce Marketing Cloud REST API access token using the TSSD-based /v2/token endpoint

domain: salesforce.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

In-depth guide

Salesforce Bulk API 2.0 limits — the full failure-mode walkthrough related to salesforce.com, checked against official docs, with linked verified routes.

Steps

  1. Create a Server-to-Server installed package in Marketing Cloud Setup and record the Client ID, Client Secret, and the tenant-specific subdomain (TSSD) shown on the package page.
  2. POST to https://{TSSD}.auth.marketingcloudapis.com/v2/token with grant_type: client_credentials, client_id, and client_secret in the JSON body.
  3. The response contains 'access_token', 'token_type': 'Bearer', 'expires_in' (seconds, typically 1080), and 'rest_instance_url' — store the rest_instance_url as the base for all subsequent API calls.
  4. Include Authorization: Bearer {access_token} on all Marketing Cloud REST requests and use the rest_instance_url (not a generic domain) as the host.
  5. Implement token caching: refresh the token when expires_in minus a safety buffer (e.g., 60 seconds) is reached rather than re-authenticating on every request.
  6. For multi-business-unit scenarios, note that the token is scoped to the BU of the installed package — cross-BU operations require a separate installed package per BU or use of the MID-scoped endpoints.

Known gotchas

Related routes

Obtain an OAuth2 access token for the Koha REST API using the client credentials grant
koha-community.org · 5 steps · unrated
Authenticate to Salesforce server-to-server using the JWT Bearer flow
developer.salesforce.com · 5 steps · unrated
Send a Salesforce Marketing Cloud triggered send via the Transactional Messaging REST API
salesforce.com · 6 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans