-
Notifications
You must be signed in to change notification settings - Fork 133
Since Synthesize method always adds watson-token parameter, it becomes 401 response when access_token is specified. #96
Description
I am sorry I have issued Issue many times due to my lack of confirmation
The access_token parameter of synthesize.js is still not working.
Because it is a different problem, I have voted for another Issue.
The cause is Synthesize.js L: 49, 59
options ['watson-token'] = options.token;
delete options.token;
By having unconditionally setting the 'watson-token' attribute
Authentication failed and it became an HTTP status code 401 (unauthorized).
speech-to-text / recognize-stream.js Like line 137
Could you add a check for the existence of "options.token"?
(I think that checking that 'watson-token' does not exist is unnecessary ..)
I confirmed it by deleting the watson-token parameter with "Edit and Resend" in "fierfox" Developper Tools and resending it
By deleting the watson - token parameter, HTTP status code 200 has been reached.
- Steps to reproduce
- Same as Synthesize method does not honor access_token from IAM API Key #92 or Synthesize method of /text-to-speech/synthesize.js also does not accept access_token #94
- Expected behavior
- Same as Synthesize method does not honor access_token from IAM API Key #92 or Synthesize method of /text-to-speech/synthesize.js also does not accept access_token #94
- Actual behavior
- Same as Synthesize method does not honor access_token from IAM API Key #92 or Synthesize method of /text-to-speech/synthesize.js also does not accept access_token #94
- Browser version (s)
- Firefox 63.0.1 (64 bit)
- SDK version
- v 0.35.2