weclapp connect
This module can use for call any weclapp API or simple validating an user from external software.
How to use
- Create a file called handshake-config.json in root directory
- fill all tenant details. like this
{ "username": "*", "password": "123456", "tenant": "gupta", "apiKey": "KjpkNTYzMTEzYi01NjU2LTRkNDMtOGU2Ni0wNmJiMTY5Mjc3NzU=", "allowed": ["get", "post", "delete"], "debug":"true" }
- add this line where you want to access this -
import $con from '~/lib/connect.js'
- add this line of code inside methods or created (E.g in nuxt)
async testCall(){ var config = { 'method': 'get', 'url': '/done.json', 'params': {} } var resp = await $con.call(config) console.log('Final Response = ', resp) }