Create Token API will give the token in the response which will be used in .js function.

Refer Guides -> Authentication [Stable] to understand how Authorization header has to be passed.

Language
Authentication
Header
Click Try It! to start a request and see the response here!