| layout | page |
|---|---|
| title | Applet Authentication |
| permalink | /applet-development/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"
}
}The API key is accessible via this.authorization.apiKey. Example:
this.serviceHeaders = {
"Content-Type": "application/json",
"X-API-KEY": this.authorization.apiKey,
}