Watson Speech-to-text authorization issue
I'm moving 3 Watson services from an old account to a Lite account (to avoid being charged on 1st December). The Text-to-Speech and Assistant services both work fine in the new account but I'm getting a 401 unauthorized error with the Speech-to-text (STT) service. All three are instantiated using the IAM apikey and associated urls, as indicated in my IBM console dashboard. If I switch STT back to my old account (username/password credentials) it works fine with the other two IAM services. The environment is a Java Spring-based website using the latest watson java-sdk (6.9.1) and latest speech-javascript-sdk. Here's the relevant entries from the log:
Nov 12, 2018 1:42:13 PM okhttp3.internal.platform.Platform log INFO:
--> GET https://stream.watsonplatform.net/authorization/api/%2Fv1%2Ftoken?url=https%3A%2F%2Fstream.watsonplatform.net%2Fspeech-to-text%2Fapi
http/1.1
Nov 12, 2018 1:42:13 PM okhttp3.internal.platform.Platform log INFO:
<-- HTTP FAILED: java.io.IOException: unexpected end of stream on
Connection{stream.watsonplatform.net:443, proxy=DIRECT
hostAddress=stream.watsonplatform.net/169.61.44.182:443
cipherSuite=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 protocol=http/1.1}
Nov 12, 2018 1:42:17 PM okhttp3.internal.platform.Platform log INFO:
--> GET https://stream.watsonplatform.net/authorization/api/%2Fv1%2Ftoken?url=https%3A%2F%2Fstream.watsonplatform.net%2Fspeech-to-text%2Fapi
http/1.1
Nov 12, 2018 1:42:17 PM okhttp3.internal.platform.Platform log INFO:
<-- 301 Moved Permanently
https://stream.watsonplatform.net/authorization/api/%2Fv1%2Ftoken?url=https%3A%2F%2Fstream.watsonplatform.net%2Fspeech-to-text%2Fapi
(89ms, 129-byte body)
Nov 12, 2018 1:42:17 PM okhttp3.internal.platform.Platform log INFO:
--> GET https://stream.watsonplatform.net/authorization/api/v1/token?url=https%3A%2F%2Fstream.watsonplatform.net%2Fspeech-to-text%2Fapi
http/1.1 Nov 12, 2018 1:42:17 PM okhttp3.internal.platform.Platform
log
INFO: <-- 401 Unauthorized
https://stream.watsonplatform.net/authorization/api/v1/token?url=https%3A%2F%2Fstream.watsonplatform.net%2Fspeech-to-text%2Fapi
(116ms, 103-byte body)
Nov 12, 2018 1:42:18 PM
com.ibm.watson.developer_cloud.service.WatsonService
processServiceCall SEVERE: GET
https://stream.watsonplatform.net/authorization/api/v1/token?url=https%3A%2F%2Fstream.watsonplatform.net%2Fspeech-to-text%2Fapi,
status: 401, error: Unauthorized
I've tried to determine what's causing the unexpected end of stream
(which is likely the true problem here) without success. For giggles, I tried adding a call to retrieve the SpeechModels list right after instantiating SpeechToText and it worked fine! Very curious. The "tip" that accompanies the last error above asks if the endpoint was set, and yes, it was set correctly.
Any help greatly appreciated.
java ibm-watson speech-to-text
add a comment |
I'm moving 3 Watson services from an old account to a Lite account (to avoid being charged on 1st December). The Text-to-Speech and Assistant services both work fine in the new account but I'm getting a 401 unauthorized error with the Speech-to-text (STT) service. All three are instantiated using the IAM apikey and associated urls, as indicated in my IBM console dashboard. If I switch STT back to my old account (username/password credentials) it works fine with the other two IAM services. The environment is a Java Spring-based website using the latest watson java-sdk (6.9.1) and latest speech-javascript-sdk. Here's the relevant entries from the log:
Nov 12, 2018 1:42:13 PM okhttp3.internal.platform.Platform log INFO:
--> GET https://stream.watsonplatform.net/authorization/api/%2Fv1%2Ftoken?url=https%3A%2F%2Fstream.watsonplatform.net%2Fspeech-to-text%2Fapi
http/1.1
Nov 12, 2018 1:42:13 PM okhttp3.internal.platform.Platform log INFO:
<-- HTTP FAILED: java.io.IOException: unexpected end of stream on
Connection{stream.watsonplatform.net:443, proxy=DIRECT
hostAddress=stream.watsonplatform.net/169.61.44.182:443
cipherSuite=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 protocol=http/1.1}
Nov 12, 2018 1:42:17 PM okhttp3.internal.platform.Platform log INFO:
--> GET https://stream.watsonplatform.net/authorization/api/%2Fv1%2Ftoken?url=https%3A%2F%2Fstream.watsonplatform.net%2Fspeech-to-text%2Fapi
http/1.1
Nov 12, 2018 1:42:17 PM okhttp3.internal.platform.Platform log INFO:
<-- 301 Moved Permanently
https://stream.watsonplatform.net/authorization/api/%2Fv1%2Ftoken?url=https%3A%2F%2Fstream.watsonplatform.net%2Fspeech-to-text%2Fapi
(89ms, 129-byte body)
Nov 12, 2018 1:42:17 PM okhttp3.internal.platform.Platform log INFO:
--> GET https://stream.watsonplatform.net/authorization/api/v1/token?url=https%3A%2F%2Fstream.watsonplatform.net%2Fspeech-to-text%2Fapi
http/1.1 Nov 12, 2018 1:42:17 PM okhttp3.internal.platform.Platform
log
INFO: <-- 401 Unauthorized
https://stream.watsonplatform.net/authorization/api/v1/token?url=https%3A%2F%2Fstream.watsonplatform.net%2Fspeech-to-text%2Fapi
(116ms, 103-byte body)
Nov 12, 2018 1:42:18 PM
com.ibm.watson.developer_cloud.service.WatsonService
processServiceCall SEVERE: GET
https://stream.watsonplatform.net/authorization/api/v1/token?url=https%3A%2F%2Fstream.watsonplatform.net%2Fspeech-to-text%2Fapi,
status: 401, error: Unauthorized
I've tried to determine what's causing the unexpected end of stream
(which is likely the true problem here) without success. For giggles, I tried adding a call to retrieve the SpeechModels list right after instantiating SpeechToText and it worked fine! Very curious. The "tip" that accompanies the last error above asks if the endpoint was set, and yes, it was set correctly.
Any help greatly appreciated.
java ibm-watson speech-to-text
add a comment |
I'm moving 3 Watson services from an old account to a Lite account (to avoid being charged on 1st December). The Text-to-Speech and Assistant services both work fine in the new account but I'm getting a 401 unauthorized error with the Speech-to-text (STT) service. All three are instantiated using the IAM apikey and associated urls, as indicated in my IBM console dashboard. If I switch STT back to my old account (username/password credentials) it works fine with the other two IAM services. The environment is a Java Spring-based website using the latest watson java-sdk (6.9.1) and latest speech-javascript-sdk. Here's the relevant entries from the log:
Nov 12, 2018 1:42:13 PM okhttp3.internal.platform.Platform log INFO:
--> GET https://stream.watsonplatform.net/authorization/api/%2Fv1%2Ftoken?url=https%3A%2F%2Fstream.watsonplatform.net%2Fspeech-to-text%2Fapi
http/1.1
Nov 12, 2018 1:42:13 PM okhttp3.internal.platform.Platform log INFO:
<-- HTTP FAILED: java.io.IOException: unexpected end of stream on
Connection{stream.watsonplatform.net:443, proxy=DIRECT
hostAddress=stream.watsonplatform.net/169.61.44.182:443
cipherSuite=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 protocol=http/1.1}
Nov 12, 2018 1:42:17 PM okhttp3.internal.platform.Platform log INFO:
--> GET https://stream.watsonplatform.net/authorization/api/%2Fv1%2Ftoken?url=https%3A%2F%2Fstream.watsonplatform.net%2Fspeech-to-text%2Fapi
http/1.1
Nov 12, 2018 1:42:17 PM okhttp3.internal.platform.Platform log INFO:
<-- 301 Moved Permanently
https://stream.watsonplatform.net/authorization/api/%2Fv1%2Ftoken?url=https%3A%2F%2Fstream.watsonplatform.net%2Fspeech-to-text%2Fapi
(89ms, 129-byte body)
Nov 12, 2018 1:42:17 PM okhttp3.internal.platform.Platform log INFO:
--> GET https://stream.watsonplatform.net/authorization/api/v1/token?url=https%3A%2F%2Fstream.watsonplatform.net%2Fspeech-to-text%2Fapi
http/1.1 Nov 12, 2018 1:42:17 PM okhttp3.internal.platform.Platform
log
INFO: <-- 401 Unauthorized
https://stream.watsonplatform.net/authorization/api/v1/token?url=https%3A%2F%2Fstream.watsonplatform.net%2Fspeech-to-text%2Fapi
(116ms, 103-byte body)
Nov 12, 2018 1:42:18 PM
com.ibm.watson.developer_cloud.service.WatsonService
processServiceCall SEVERE: GET
https://stream.watsonplatform.net/authorization/api/v1/token?url=https%3A%2F%2Fstream.watsonplatform.net%2Fspeech-to-text%2Fapi,
status: 401, error: Unauthorized
I've tried to determine what's causing the unexpected end of stream
(which is likely the true problem here) without success. For giggles, I tried adding a call to retrieve the SpeechModels list right after instantiating SpeechToText and it worked fine! Very curious. The "tip" that accompanies the last error above asks if the endpoint was set, and yes, it was set correctly.
Any help greatly appreciated.
java ibm-watson speech-to-text
I'm moving 3 Watson services from an old account to a Lite account (to avoid being charged on 1st December). The Text-to-Speech and Assistant services both work fine in the new account but I'm getting a 401 unauthorized error with the Speech-to-text (STT) service. All three are instantiated using the IAM apikey and associated urls, as indicated in my IBM console dashboard. If I switch STT back to my old account (username/password credentials) it works fine with the other two IAM services. The environment is a Java Spring-based website using the latest watson java-sdk (6.9.1) and latest speech-javascript-sdk. Here's the relevant entries from the log:
Nov 12, 2018 1:42:13 PM okhttp3.internal.platform.Platform log INFO:
--> GET https://stream.watsonplatform.net/authorization/api/%2Fv1%2Ftoken?url=https%3A%2F%2Fstream.watsonplatform.net%2Fspeech-to-text%2Fapi
http/1.1
Nov 12, 2018 1:42:13 PM okhttp3.internal.platform.Platform log INFO:
<-- HTTP FAILED: java.io.IOException: unexpected end of stream on
Connection{stream.watsonplatform.net:443, proxy=DIRECT
hostAddress=stream.watsonplatform.net/169.61.44.182:443
cipherSuite=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 protocol=http/1.1}
Nov 12, 2018 1:42:17 PM okhttp3.internal.platform.Platform log INFO:
--> GET https://stream.watsonplatform.net/authorization/api/%2Fv1%2Ftoken?url=https%3A%2F%2Fstream.watsonplatform.net%2Fspeech-to-text%2Fapi
http/1.1
Nov 12, 2018 1:42:17 PM okhttp3.internal.platform.Platform log INFO:
<-- 301 Moved Permanently
https://stream.watsonplatform.net/authorization/api/%2Fv1%2Ftoken?url=https%3A%2F%2Fstream.watsonplatform.net%2Fspeech-to-text%2Fapi
(89ms, 129-byte body)
Nov 12, 2018 1:42:17 PM okhttp3.internal.platform.Platform log INFO:
--> GET https://stream.watsonplatform.net/authorization/api/v1/token?url=https%3A%2F%2Fstream.watsonplatform.net%2Fspeech-to-text%2Fapi
http/1.1 Nov 12, 2018 1:42:17 PM okhttp3.internal.platform.Platform
log
INFO: <-- 401 Unauthorized
https://stream.watsonplatform.net/authorization/api/v1/token?url=https%3A%2F%2Fstream.watsonplatform.net%2Fspeech-to-text%2Fapi
(116ms, 103-byte body)
Nov 12, 2018 1:42:18 PM
com.ibm.watson.developer_cloud.service.WatsonService
processServiceCall SEVERE: GET
https://stream.watsonplatform.net/authorization/api/v1/token?url=https%3A%2F%2Fstream.watsonplatform.net%2Fspeech-to-text%2Fapi,
status: 401, error: Unauthorized
I've tried to determine what's causing the unexpected end of stream
(which is likely the true problem here) without success. For giggles, I tried adding a call to retrieve the SpeechModels list right after instantiating SpeechToText and it worked fine! Very curious. The "tip" that accompanies the last error above asks if the endpoint was set, and yes, it was set correctly.
Any help greatly appreciated.
java ibm-watson speech-to-text
java ibm-watson speech-to-text
asked Nov 12 '18 at 20:11
LWK69LWK69
460722
460722
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Never mind. I was focused on the java error and didn't look that closely at the javascript side of the equation. I found this note in the node.js sdk:
NOTE: Authenticating with the X-Watson-Authorization-Token header or
the watson-token query param is now deprecated. The token continues to
work with Cloud Foundry services, but is not supported for services
that use Identity and Access Management (IAM) authentication.
STT in my old account was a Cloud Foundry service which is why it continued to work. My bad for not doing more research...
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53269406%2fwatson-speech-to-text-authorization-issue%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Never mind. I was focused on the java error and didn't look that closely at the javascript side of the equation. I found this note in the node.js sdk:
NOTE: Authenticating with the X-Watson-Authorization-Token header or
the watson-token query param is now deprecated. The token continues to
work with Cloud Foundry services, but is not supported for services
that use Identity and Access Management (IAM) authentication.
STT in my old account was a Cloud Foundry service which is why it continued to work. My bad for not doing more research...
add a comment |
Never mind. I was focused on the java error and didn't look that closely at the javascript side of the equation. I found this note in the node.js sdk:
NOTE: Authenticating with the X-Watson-Authorization-Token header or
the watson-token query param is now deprecated. The token continues to
work with Cloud Foundry services, but is not supported for services
that use Identity and Access Management (IAM) authentication.
STT in my old account was a Cloud Foundry service which is why it continued to work. My bad for not doing more research...
add a comment |
Never mind. I was focused on the java error and didn't look that closely at the javascript side of the equation. I found this note in the node.js sdk:
NOTE: Authenticating with the X-Watson-Authorization-Token header or
the watson-token query param is now deprecated. The token continues to
work with Cloud Foundry services, but is not supported for services
that use Identity and Access Management (IAM) authentication.
STT in my old account was a Cloud Foundry service which is why it continued to work. My bad for not doing more research...
Never mind. I was focused on the java error and didn't look that closely at the javascript side of the equation. I found this note in the node.js sdk:
NOTE: Authenticating with the X-Watson-Authorization-Token header or
the watson-token query param is now deprecated. The token continues to
work with Cloud Foundry services, but is not supported for services
that use Identity and Access Management (IAM) authentication.
STT in my old account was a Cloud Foundry service which is why it continued to work. My bad for not doing more research...
edited Nov 12 '18 at 20:38
answered Nov 12 '18 at 20:30
LWK69LWK69
460722
460722
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53269406%2fwatson-speech-to-text-authorization-issue%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown