如何在RingCentral开发者沙箱中为Outbound Fax API创建第二个传真分机
Hey there! Let's walk through how to create that second fax user extension for your Outbound Fax API needs. I'll break this down step by step using the RingCentral REST API, including how to leverage the endpoint you already mentioned and the necessary POST request to set up the new extension.
Prerequisites
First, make sure you have these covered:
- A RingCentral sandbox account with admin permissions (you’ll need this to create and manage extensions)
- Your
accountId(you can grab this from your sandbox dashboard or via the account info API endpoint) - A valid access token (generated via OAuth 2.0 for your app, with scopes like
EditExtensionsenabled)
Step 1: Check Existing Extensions (Using Your Endpoint)
Before creating a new extension, confirm what’s already in your account to avoid duplicates. Use the GET endpoint you provided to list all extensions:
GET https://platform.devtest.ringcentral.com/restapi/v1.0/account/:accountId/extension?page=1&perPage=100
Replace :accountId with your actual account ID. This response will show you all existing extensions, their IDs, and available phone numbers you can assign to the new fax user.
Step 2: Create the New Fax User Extension
To add a new extension, send a POST request to the same extensions endpoint. Here’s the full breakdown:
Request Endpoint
POST https://platform.devtest.ringcentral.com/restapi/v1.0/account/:accountId/extension
Request Payload
This is a minimal, valid payload for a fax-focused user extension. Adjust values to fit your sandbox setup:
{ "type": "User", "name": "Fax User 2", "contact": { "firstName": "Fax", "lastName": "User 2" }, "phoneNumber": { "phoneNumber": "+15551234567" // Use an available number from your sandbox }, "fax": { "send": true, "receive": true }, "password": "SecurePass123!" // Must meet RingCentral's complexity rules (8+ chars, mix of types) }
Quick notes:
- The
phoneNumbermust be a valid number assigned to your sandbox account. If you need to find available numbers, use the/account/:accountId/phone-numberendpoint. - The
passwordneeds to follow RingCentral’s requirements (typically 8+ characters, with letters, numbers, and symbols).
Required Headers
Don’t forget these headers in your request:
Authorization: Bearer YOUR_ACCESS_TOKENContent-Type: application/json
Step 3: Configure Fax Settings (Optional but Useful)
Once the extension is created, you might want to tweak its fax preferences—like setting a default cover page or email notifications for incoming faxes. Use a PUT request to update these settings:
PUT https://platform.devtest.ringcentral.com/restapi/v1.0/account/:accountId/extension/:extensionId/fax
Payload example:
{ "coverPage": "Standard", "emailNotification": { "enabled": true, "email": "faxuser2@yourdomain.com" } }
Replace :extensionId with the ID of the new extension you just created.
Step 4: Test the Extension
To confirm everything works, send a test fax using the Outbound Fax API with the new extension’s ID. The endpoint for sending faxes is:
POST https://platform.devtest.ringcentral.com/restapi/v1.0/account/:accountId/extension/:extensionId/fax
Include required parameters like the recipient to number and your fax attachment (as a base64 string or URL) in the request.
Troubleshooting Tips
- Permission errors: Double-check that your app’s access token has the
EditExtensionsscope enabled in the RingCentral Developer Portal. - Invalid phone number: Ensure the number you’re assigning is owned by your sandbox account and not already used by another extension.
- Password issues: Verify your password meets RingCentral’s complexity requirements (check sandbox docs for exact rules).
内容的提问来源于stack exchange,提问作者Manadip

