Administration¶
Follow these steps to authenticate the app and use the console commands as well as the API.
Url segment challenge
Create a url segment challenge consisting of lower case letters and numbers with about 20 characters.
Create an app
Login to developer.bexio.com and create an app.
The redirect URL has the scheme:
[https://domain.ch]/bexio-auth-[url segment challenge]Replace [https://domain.ch] with your domain and [url segment challenge] with a cryptic value created in the previous step.
Take note from the
Client IDand theClient Secret.
Create site configuration
Create a bexio folder in your site directory. In case the site identifier is
defaultthe directory hierarchy would beconfig/sites/default/bexio.Create a bexio configuration file
config/sites/default/bexio/site.yaml.Include the bexio configuration file in
config/sites/default/config.yamlby adding the following lines on the bottom:imports: - { resource: './bexio/site.yaml' }
Copy the following configuration into the bexio configuration file (
config/sites/default/bexio/site.yaml) and set theurlSegmentChallenge, theclientIdas well as theclientSecretwith the values obtained in the previous steps:auth: urlSegmentChallenge: muhh clientId: 11111111-1111-1111-11111111111111111 clientSecret: aaaaaaaaaaaaaaaaaaaa-aaaaa-aaaaaaaaaa-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa scopes: ['openid', 'profile', 'contact_edit', 'offline_access', 'kb_invoice_edit', 'bank_payment_edit']
Clear the cache
This is needed since the site configuration changed.
Authenticate the app
Load the
Redirect URLdefined for the bexio app in a browser. The url has the following structure:[https://domain.ch]/bexio-auth-[url segment challenge]Finalize site configuration
Add the remaining site configuration properties to the bexio configuration file
config/sites/default/bexio/site.yaml.Use it…
Use the console commands as well as the API.