Dieses beA-Javascript ermöglicht es Ihnen, den Zugriff auf das beA in Ihre Kanzleisoftware zu integrieren. Sie können das Abholen und Versenden von beA-Nachrichten in Ihrer Software und somit auch an Ihren Workflow anpassen. Wir stellen ca. 40 Funktionen rund um das beA-Postfach mit der entsprechenden Dokumentation und Beispielsoftware bereit.
Proof of concept (ForlderOverview of a beA-Account/INBOX just using a valid Softwaretoken): console.bea.expert
To use this script you need first to subscribe to a beA.expert API-Account. For more information: bea.expert/api/
| Function | Purpose |
|---|---|
bea_get_userjournal |
journal of a user (identity SAFE-ID) |
bea_get_message_pruefprotokoll |
"Prüfprotokoll" of a message as PDF |
p7s_digest_algorithm |
hash algorithm (sha256, sha384, sha512, ...) used by a .p7s / .pkcs7 signature |
bea_get_gericht_codes |
codes of the courts for msg_infos.gericht_code (code list GDS.Gerichte) |
qes_get_sigtoken |
qualified electronic signature (qeS): sigtoken, devices and certificates of the user |
qes_sign_file |
qeS: start the signature of one or more files |
qes_get_signature |
qeS: poll the state of the signature, fetch the signatures |
Removed: bea_get_addressbook - deprecated, the API answers "bea_get_addressbook deprecated".
Tested on 26.11.2026 against the beA test environment together with the three other libraries: every function except the address book functions, the qeS functions and bea_cleanup_message, including a message sent from each library and read by each of the others.
Prüfprotokoll: the message has to be available in the beA postbox. Attachments with a signature file (name.pdf + name.pdf.p7s or .pkcs7) are hashed with the algorithm of their signature (first signer), all other attachments with SHA-256. The request field is still called sha256; the algorithm is sent in digest_alg. bea_get_message_pruefprotokoll(token, messageId, sessionKey, pdf_file_name) returns a JSON string with token and payload (PDF, base64) or token and error; with a file name as 4th parameter the PDF is also offered as download. In the browser SHA-3 signatures are not supported (error "unsupported hash algorithm").
qeS: call qes_get_sigtoken, then qes_sign_file with one device and one certificate of its result and the files (file_name, file_b64, file_sha256_hexhash). The user confirms the signature on the device; poll qes_get_signature with the id of the transaction (e.g. every 2 seconds) until signatures or an error are returned. Every response contains a new token: always continue with the token of the last response. qes_file_entry(file_name, raw_data) creates one entry of the files list.
Also added, as in the Python library: bea_check_session, bea_get_accessrights, bea_get_configuration, bea_get_message_confirmations, bea_get_messagejournal, bea_get_postboxjournal, and the optional parameter safeId of bea_get_identitydata.
Other changes:
bea_get_messagewas defined twice, there is one definition now. It returns the response of the API unchanged if it contains anerror, and its result contains thetoken.bea_get_folderoverviewdoes the same.- All requests and the subject are sent as UTF-8: umlauts in subject, message text, search and folder names work.
- The hash of an attachment is computed over the raw bytes and
sizeKBis the size of the file. - Attachments with umlauts in the file name are decrypted.
bea_save_messageandbea_send_messagetake an optionalmessageDraft({ key, messageToken }frombea_init_message_draft) to edit a draft, as in the Python library.bea_init_message_draftandbea_searchsend the configuredbex-ident(they sent a fixed test value), andbea_init_message_draftreturns the SAFE-IDs of the receivers inmsg_infos.receivers.
The script posts to its own origin (/bea_...). The functions bex_login_step1-3, bea_get_postboxes, bea_get_folderoverview and bea_logout do not send the bex-ident header: the server that delivers the page has to forward the calls to the API and add it.
Examples: example_get_pruefprotokoll, example_qes_sign_file.
forge.min.js and jsrsasign-all-min.js (both part of this repository). No additional library is needed for version 3.0.
GPL-2.0 or BSD-3-Clause, at your option: see LICENSE.