Skip to content

Since Synthesize method always adds watson-token parameter, it becomes 401 response when access_token is specified. #96

@NobuyukiMonna

Description

@NobuyukiMonna

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions