Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from bundle
Operational SendPulse skill with live-verified REST, MCP handshake, and MCP tool-call tests.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/auth-and-connection.md
1# SendPulse auth and connection notes23## Official pages45Use these pages as the default public source of truth:67- REST API docs: `https://sendpulse.com/integrations/api`8- MCP setup guide: `https://sendpulse.com/knowledge-base/account-settings/mcp-server`9- MCP tools list: `https://sendpulse.com/knowledge-base/account-settings/mcp-tools`10- MCP product page: `https://sendpulse.com/features/mcp`1112## REST API basics1314- Root URL: `https://api.sendpulse.com`15- Transport: HTTPS16- Response format: JSON17- Authorization header for API requests:18- `Authorization: Bearer <your_token_or_key>`1920## REST auth option 1 — API key2122Use when setup speed and operational simplicity matter most.2324Key properties:2526- static, long-lived credential27- valid until manually revoked28- generated in SendPulse account settings under API29- up to 5 independent keys30- can be restricted by IP address3132Good fit:3334- internal integrations35- backend services36- prototypes37- agent workflows where token refresh is unnecessary complexity3839## REST auth option 2 — OAuth 2.0 client credentials4041Use when short-lived access is preferred.4243Token request:4445- `POST https://api.sendpulse.com/oauth/access_token`46- required parameters:47- `grant_type=client_credentials`48- `client_id`49- `client_secret`5051Behavior:5253- returns a Bearer token54- token lifetime is about 1 hour55- request a new token only after expiry5657Good fit:5859- environments that already handle token refresh60- integrations with stricter secret-lifetime requirements61- work specifically centered on OAuth flows6263## MCP basics6465Official MCP server URL:6667- `https://mcp.sendpulse.com/mcp`6869Conceptual flow:70711. user asks the AI assistant for an action722. client sends the request to the MCP server733. MCP server calls SendPulse API744. result returns to the client chat7576## MCP auth is not the same as REST auth7778Do not collapse MCP auth into the API key vs OAuth explanation.79Use client-specific setup.8081### OpenAI-style MCP setup8283According to SendPulse docs, the connection flow requires:8485- adding a new MCP server in the client86- pasting the SendPulse MCP URL87- using custom headers for auth:88- `X-SP-ID`89- `X-SP-SECRET`9091The docs say to copy ID and Secret values from Account settings > API.9293### Cursor setup notes9495SendPulse docs show a minimal MCP config that points Cursor to:9697```json98{99"mcpServers": {100"sendpulse_mcp_service": {101"url": "https://mcp.sendpulse.com/mcp"102}103}104}105```106107Then complete authorization in the browser flow if prompted.108109## First-success validation110111### REST112113Use `GET https://api.sendpulse.com/user/info` as the default smoke test.114115Bundled scripts:116117- `scripts/rest_api_key_smoke.sh` — live-verified with API key on `/user/info`118- `scripts/rest_oauth_smoke.sh` — dry-run verified, waiting for live OAuth creds119- `scripts/rest_request.sh` — live-verified with Bearer auth on `/user/info`120121### MCP122123Before promising a tool exists:1241251. check the client's visible tools list1262. cross-check the official tools page: `https://sendpulse.com/knowledge-base/account-settings/mcp-tools`1273. run one harmless read-only task first128129## Useful framing sentence130131Use this wording when helpful:132133`MCP is the fastest way to let an AI assistant operate your SendPulse account, while the REST API remains the canonical surface for direct backend integrations.`134