myCRMSIM

myCRMSIM API 1.0

Get Started
​
No token

Exchange code for tokens

POST

/api/v1/third_party_integrations/oauth/token

Exchange an authorization code for an access token and refresh token.

Auth: client_id + client_secret

Server-to-server. Send the code your callback received along with your client_id + client_secret. Returns both tokens — store them in your database, keyed by the installing user. Codes are single-use and expire 10 minutes after consent: a second exchange with the same code returns an error indicating that the code has already been used. If the exchange times out or returns a 5xx, retry it once; if the retry reports the code as already used, the first attempt was processed and no tokens can be recovered — send the user through the install URL again. The token endpoints are not covered by the per-installation API rate limits and do not return 429.

Responses

StatusWhen
200
Success — tokens issued
400
Invalid or expired authorization code
400
Code already used (single-use enforcement)
Request
curl -X POST "https://backend.mysmsgateway.app/api/v1/third_party_integrations/oauth/token" \
  -H "Content-Type: application/json" \
  -d '{
  "grant_type": "authorization_code",
  "code": "4f8a7e1d2c9b3a5f6e0d1c2b7a8f9e6d",
  "client_id": "<YOUR CLIENT_ID>",
  "client_secret": "<YOUR CLIENT_SECRET>",
  "redirect_uri": "https://your-app.com/oauth/callback"
}'
Responses
Success — tokens issued
{
  "success": true,
  "data": {
    "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "token_type": "Bearer",
    "expires_in": 86400,
    "scopes": [
      "contacts.read",
      "contacts.write"
    ]
  }
}
Try It!
Request URL
POSThttps://backend.mysmsgateway.app/api/v1/third_party_integrations/oauth/token
Previous

« Send the user to the install URL

Next

Refresh tokens »