Solved Outbound SMS with Bandwidth

Status
Not open for further replies.

aleksbor

Bronze Partner
Joined
Mar 9, 2022
Messages
22
Reaction score
5
Hello All,

We have authentication issues when sending via Bandwidth. SMS setup documentation for the Bandwidth provider is dated and references username/password values that are no longer present.
We have the Bandwidth SMS Application API token that works with CURL, but we don't know where to plug the token in 3CX to make the outbound SMS flow work.
No matter what we try in 3CX we get:
_3CX.GatewayService.Server.SmsProviders.BandwidthProvider] bandwidth: Status: 401, Reason:
Please advise.
CURL script:
curl -v -u 'TOKEN:SECRET' \
https://messaging.bandwidth.com/api/v2/users/YOUR_ACCOUNT_ID/messages \
-H 'Content-Type: application/json' \
-d '{
"applicationId":"YOUR_MESSAGING_APP_ID",
"to":["+1XXXXXXXXXX"],
"from":"+1YOUR_DID",
"text":"curl test"
}'
 
3cx_sms.png
Client ID and Clitent Secret is what we think we should use, but it does nto work.
 
Have you confirmeda all steps as per guideline here?
 
Hi @aleksbor

The guide is up to date for Update 8 which is the stable version out. The guide will be updated once Update 9 is fully released.
Here is the part you are looking for:

Create API Credentials
  1. Navigate to “Account” and select “API Credentials”
  2. Click the “+Add” button
  3. Give it a name and under “Account Scope” select “Basic Access”
  4. For Secret Expiration date select “Secret does not expire”
  5. Select your account from the “Accounts” drop down
  6. Under “Roles” select “Basic Access”
  7. Click “Save” and make a note of the client ID and the client secret.

This will give you Client ID and Client secret which you can use.
 
  • Like
Reactions: aleksbor
Hello @YiannisH_3CX , there is no role called "Basic Access" unfortunately:
Available roles are:
Billing Reports
Campaign Management
Configuration
Credential Access Role
Disconnect
E911 Management
External TNs
HTTP Application Management
Line Features
Ordering
Porting
Regulatory
Reporting
TN Lookup
User Administrator
Voice Insights

Tried most of those roles besides ordering, porting, etc., and failed to authenticate with all of them against messaging.bandwidth.com/api/v2/users/
We also tried the bandwidth username/password per the current documentation. It does work via curl, but fails in 3CX.
 
Last edited:
You are right about the role. It seems Basic Access was removed but i just created a new set of API credentials and selected "Configuration" as the role and it worked fine for me.

Are the rest of the details you are using correct? Can you verify the App ID and Account ID and make sure those are correct?
 
  • Like
Reactions: KyriacosS_3CX
The App ID looked correct, but I refreshed it, and it started working. Thank you for your assistance!
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
111,973
Messages
590,075
Members
164,895
Latest member
jasonkkrause