hunkim / Wit-Facebook

Wit-Faebook Messenger Example
158 stars 259 forks source link

Error: Could not find access token #16

Open neeraj87 opened 7 years ago

neeraj87 commented 7 years ago

When I run the app it gives the "could not find access token error"

Error: Could not find access token, learn more at https://wit.ai/docs
    at validate (/Volumes/Macintosh HD 2/GitHub Cloned Repos/node-wit.ai/node_modules/node-wit/lib/wit.js:210:11)
    at new Wit (/Volumes/Macintosh HD 2/GitHub Cloned Repos/node-wit.ai/node_modules/node-wit/lib/wit.js:24:45)
    at Object.getWit (/Volumes/Macintosh HD 2/GitHub Cloned Repos/node-wit.ai/bot.js:82:10)
    at Object.<anonymous> (/Volumes/Macintosh HD 2/GitHub Cloned Repos/node-wit.ai/app.js:13:17)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Function.Module.runMain (module.js:447:10)
    at startup (node.js:148:18)

As far as I know my access token is there on the const.js file

tarokawada commented 7 years ago

Same issue is happening to me but i saved mine in config variable. Have you found a way to resolve this?

timxor commented 7 years ago

+1

willian-viana commented 7 years ago

+1

hunkim commented 7 years ago

Any solution for this?

Rolfjdra commented 7 years ago

I never had this issue until now. I solved it by changing: "return new Wit(Config.WIT_TOKEN, actions);" to "return new Wit({ accessToken: Config.WIT_TOKEN, actions: actions });"

You can give that a try ;)