Applet Authentication
As of this writing, Q applets support API key authentication.
To request a user API key, add the following snippet to package.json
inside qConfig
:
"qConfig": {
// ....
"authorization": {
"type": "apiKey",
"hint": "Login or signup for free to get your API key",
"supportUrl": "https://montastic.com/me"
}
}
Accessing API key from index.js
The API key is accessible via this.authorization.apiKey
. Example:
this.serviceHeaders = {
"Content-Type": "application/json",
"X-API-KEY": this.authorization.apiKey,
}