In this video, write code for accessing the same functionality via an access token authentication approach instead.
- [Instructor] Now we just saw…how you can call…getLanguagesForTranslate…and we did so by authenticating.…You have to authenticate otherwise it will give you a 401.…401 Unauthorized.…And the way we were doing the authentication…is by passing in…this header that you see on line 24.…There is another way of authenticating…against COG services…this applies to a lot of services…and COG services…and that is via…an accessToken.…Let me show you next how that works.…
So before we can make such a call…I will need an accessToken.…The theory is…that I put the accessToken…in the header of my request.…Okay let's write a function here…called function getAccessToken()…and this has to be an async operation…so this will be Promise string return type…and here let's go ahead and define our Promise…so const promise…equals new Promise<string>…(resolve, reject)…So this is the basics of async programming in Javasacript.…
This is one way of doing it.…Certainly there are other ways of doing it as well.…The theory over here is that…a call will be made…
- Using the Translate Text API
- Getting supported languages
- Writing code to translate between languages
- Performing text to speech
- Setting up speech to text
- Writing code for speaker identification
Skill Level Intermediate
Microsoft Cognitive Services for Developers: 1 Visionwith Sahil Malik2h 35m Intermediate
Learning Microsoft Cognitive Services for Developerswith Sahil Malik1h 42m Intermediate
Creating Bots with the Microsoft Bot Framework, Part 1with Scott Peterson45m 41s Intermediate
1. The Basics
2. Translation Text API
3. Bing Speech API
4. Speaker Recognition API
Next steps1m 9s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.