Zoom Phone SMS API: error 7639 from Server-to-Server OAuth app even when sender is the number's owner

We are building an internal staff app for our campgrounds and want to send SMS from our park phone numbers through the Zoom Phone SMS API. Our 10DLC campaign is active and the numbers are assigned to it. Support cases TS2497368 and TS2497401 were both closed by T1 as “configuration-related / outside Developer Support Plan” and pointed us here.

App: Server-to-Server OAuth, app ID (token via grant_type=account_credentials)

Request

POST https://api.zoom.us/v2/phone/sms/messages
Authorization: Bearer <S2S access token>
Content-Type: application/json

{
  "message": "GatherGrounds test text - please ignore.",
  "sender": {
    "user_id": "LcPogqg1TPO9WjRgKbdL7Q",
    "phone_number": "+19896349782"
  },
  "to_members": [ { "phone_number": "+1989715XXXX" } ]
}

Response

HTTP 400
{"code":7639,"message":"The SMS for the number does not belong to the current user."}

What we have verified

  • sender.user_id is the number’s owner: GET /v2/phone/numbers?type=assigned shows +19896349782 assignee = {"id":"LcPogqg1TPO9WjRgKbdL7Q","name":"Walnut Hills Office Staff","extension_number":514,"type":"user"}, and GET /v2/phone/users lists that number under the same user. So the usual 7639 fix (send as the number owner, not an admin) is already in place.
  • SMS is enabled on the number and the user can send texts from the Zoom client.
  • Scopes on the token (from the token response): phone:read:list_numbers:admin phone:read:list_users:admin phone:read:list_call_logs:admin phone:read:call_log:admin phone:read:list_recordings:admin phone:read:list_sms_sessions:admin phone:read:sms_session:admin phone:read:sms_message:admin phone:read:list_auto_receptionists:admin phone:read:auto_receptionist:admin phone:read:list_call_queues:admin phone:read:call_queue:admin phone:read:list_call_queue_members:admin phone:read:list_call_recordings:admin phone:read:recording_transcript:admin phone:read:list_voicemails:admin phone:read:voicemail:admin phone:delete:voicemail:admin
  • There is no phone SMS write scope available in the Marketplace scope picker for this S2S app (e.g. phone:write:sms_message:admin / phone_sms:write:admin), which is what the support cases were asking about.

Questions

  1. Does POST /phone/sms/messages require a write scope that is not exposed in the scope picker for Server-to-Server apps? If so, how is it enabled?
  2. Or can Server-to-Server OAuth apps not send SMS on behalf of a user at all, so this must be a user-level OAuth app?
  3. If neither, what else does 7639 check beyond number ownership?

Thanks - happy to share anything else needed.

@Accounting1 , the legacy scopes are Write scopes whereas the granular scopes are Read which is unusual because POST endpoints typically require edit permissions. I am investigating this further.


Additionally, it says an account-level app is required, for service endpoint SMS. If you’re sending SMS from your park phone numbers can you please clarify if that is the case for you? What I need to confirm with the Phone team is if account level app here includes both S2S and Admin-Level OAuth apps since they’re both account level.

Thanks Gianni. Yes - we are sending from park phone numbers assigned to Zoom Phone users (not personal numbers), via a Server-to-Server OAuth app. We will check whether the user who scoped the app has Zoom Phone Edit permissions and report back. If S2S cannot send SMS and it must be an Admin-level OAuth app, let us know and we will build it that way.

Follow-up on permissions: the user who created and scoped the Server-to-Server app is the account Owner, so it already has every permission including Zoom Phone Edit. The scope picker for this S2S app still shows only phone:read:* scopes and no SMS write scope. We also confirmed the sender (ext 514) owns the number and can text from the Zoom client.

So the remaining question is yours to the Phone team: does the SMS-send endpoint accept a Server-to-Server OAuth token at all, or does it require an Admin-level (user-authorized) OAuth app? If it is the latter we will build that; if S2S should work, something on Zoom’s side is hiding the write scope for this account. Thanks for digging in.

@gianni.zoom quick follow-up so this doesn’t stall - two direct questions, a one-line answer to each is all we need:

  1. Can a Server-to-Server OAuth app call POST /phone/sms/messages at all? (Yes / No)
  2. If no, is an Admin-level (account-level, user-authorized) OAuth app the supported way to send SMS from a company Zoom Phone number? (Yes / No)

Permissions are ruled out on our side (the app owner is the account Owner). We are ready to rebuild as an Admin-level OAuth app today if that is the answer. Thanks.

Hi @Accounting1

No.

Yes, with an Admin-level general OAuth app you can SMS on behalf of others, however, I clarified that you need delegation enabled and Custom Engagement Pack (formerly known as “power pack”) license (ZOOM-833984, ZOOM-1158713).

Custom Engagement Pack

Setting up call delegation

Using SMS delegation in Zoom Phone

Waiting to get final sign off from the PMs, before submitting a documentation update so this information is more evident.

Let me know if you have anymore questions or if you run into any subsequent issues after those changes are made!