From 5350f7bea042fa8f3b478f168960f2ed3ce2ce76 Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Mon, 30 Aug 2021 12:37:08 -0400 Subject: [PATCH] bugfix: adding account-level speech credential with platform owner api key --- lib/routes/api/speech-credentials.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/api/speech-credentials.js b/lib/routes/api/speech-credentials.js index 8567794..075a3c8 100644 --- a/lib/routes/api/speech-credentials.js +++ b/lib/routes/api/speech-credentials.js @@ -14,7 +14,7 @@ const { router.post('/', async(req, res) => { const logger = req.app.locals.logger; const {use_for_stt, use_for_tts, vendor, service_key, access_key_id, secret_access_key, aws_region} = req.body; - const {account_sid} = req.user; + const account_sid = req.user.account_sid || req.body.account_sid; let service_provider_sid; if (!account_sid) { if (!req.user.hasServiceProviderAuth) {