Integration Process
The complete process from creating your application to making your first signing API call.
Integration Steps
1. Create an Application
Log in to the Tencent eSign Console and create an application under “App Management” to obtain your client_id and client_secret.
The client_secret is only returned once at creation time. Save it immediately to a key management system or environment variables.
2. Obtain an Access Token
Use the OAuth 2.0 Client Credentials grant to obtain an access_token:
POST https://sgapi.tencent-esign.com/openapi/v1/oauth/token
Content-Type: application/x-www-form-urlencoded
grant_type=client_credentials
&client_id=YOUR_CLIENT_ID
&client_secret=YOUR_CLIENT_SECRET
&space_id=YOUR_SPACE_ID
&scope=envelope:create envelope:readSuccessful response:
{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "Bearer",
"expires_in": 3600,
"scope": "envelope:create envelope:read"
}The token is valid for 1 hour. Cache it and request a new one approximately 60 seconds before expiry. See Authentication for details.
3. Configure Callback URL (Optional)
In the Console under “Callback Settings”, enter your CallbackUrl. The system will push notifications when envelope status changes.
4. Start Calling APIs
Include the access_token in your API calls:
Upload File → Create and Send Envelope → Get Signing Link → Query Signing StatusWe recommend completing the full workflow in a test environment before switching to production.
Typical Call Sequence
Client System Tencent eSign Platform
│ │
│─── 0. Get Token ──────────────→│ POST /openapi/v1/oauth/token
│←── Return access_token ────────│
│ │
│─── 1. Upload File ────────────→│ POST /openapi/v1/files/upload
│←── Return FileId ─────────────│
│ │
│─── 2. Create & Send Envelope ─→│ POST /openapi/v1/envelopes
│←── Return EnvelopeId ─────────│
│ │
│─── 3. Get Signing Link ───────→│ POST /openapi/v1/envelopes/{envelopeId}/signing-url
│←── Return SigningUrl ──────────│
│ │
│ (Recipient completes signing)│
│ │
│←── 4. Callback (signed) ──────│ POST your CallbackUrl
│ │
│─── 5. Get Envelope Detail ────→│ POST /openapi/v1/envelopes/detail
│←── Return full signing status ─│