myCRMSIM

myCRMSIM API 1.0

Get Started
​
No token

Refresh tokens

POST

/api/v1/third_party_integrations/oauth/token

Use the refresh token to obtain a new access token.

Auth: client_id + client_secret

When you get a 401 from the API ("Invalid or expired access token"), call this endpoint with your stored refresh_token to get a fresh pair. Replace both stored tokens with the new values. Access tokens expire after 24 hours (expires_in); refresh tokens after 1 year. Every refresh returns a new refresh token, but tokens are stateless signed JWTs: the previous refresh token is NOT invalidated by rotation and stays usable until its own expiry or until the installation is suspended. Keep only the newest pair. Because the old token stays valid, a refresh that times out or returns a 5xx is safe to retry with exponential backoff (for example 1 s, 2 s, 4 s). The token endpoints are not covered by the per-installation API rate limits and do not return 429.

Responses

StatusWhen
200
Fresh tokens issued
401
Refresh token invalid or revoked
Request
curl -X POST "https://backend.mysmsgateway.app/api/v1/third_party_integrations/oauth/token" \
  -H "Content-Type: application/json" \
  -d '{
  "grant_type": "refresh_token",
  "refresh_token": "<YOUR_REFRESH_TOKEN>",
  "client_id": "<YOUR CLIENT_ID>",
  "client_secret": "<YOUR CLIENT_SECRET>"
}'
Responses
Fresh 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

« Exchange code for tokens

Next

Who am I? »