API-Token support
Genesys supports API-Token
authentication. This ticket is to add support for API Token auth to Embedded Genesys.
Config update
Like we have clientId
and clientSecret
we can have apiToken
:
{
apiToken: "asdasdxcas"
}
The apiToken
is optional, but when it is defined, it has priority over clientId/secret
. There is no need to obtain a token and store it in the browser.
serviceAxios
configuration needs updating to use Authorization: API-Token asdas...
instead of Bearer
token when apiToken
is provided.
Installer
Update installer to also prompt for API Token. Include a note saying:
API Token will be required in 2025! Please request your token by contacting helpdesk@genesys-pgr.org and include the link to your website where Embedded Genesys is deployed.
The link to helpdesk email should have href="mailto:helpdesk@genesys-pgr.org?subject=API-Token for.....
and it should follow the similar logic as existing email href
where we generate the message subject and body.