Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
Showing results for 
Search instead for 
Did you mean: 
Note: Be aware that the steps described in this blog are performed in the KSeF portal. Though an authorization token is necessary to be added in the SAP systems, the described steps are considered a guidance and they may become obsolete if the process you do in the KSeF portal changes. 

In this blog post, we will show you how to generate an authorization token from KSeF’s portal ( You can electronically send and receive invoices in your system through the tax authority's e-Invoicing platform (KSeF). KSeF stands for Krajowy System eFaktur (official translation: The National System of e-Invoices). 

A token is needed to establish a connection between SAP Document and Reporting Compliance and KSeF so that you can check the test documents you have submitted to KSeF.   

Note: In the test environment, KSeF allows you to login without real authorization to generate the token.  

If you use the test environment of the service and want to generate an authorization token, then follow the steps below. 

  1. Provide a login context. For this enter the tax identification number (NIP) and press the Authenticate button. NIP is only 10 digits which excludes the prefix PL.

  2. Choose a login method. For the test environment, you need to select Qualified Certificate.

  3. In the next screen, you need to select yes to confirm if the certificate is a signature with the tax identification number or personal identification number. Press the Next button.

  4. In the Sign the authorization request screen, select Identifier Type as Stamp with NIP and enter the NIP number. Press the Authenticate to the test application button.

  5. Close the Authorization was successful pop-up window.

  6. Select Generate Token from the menu on the left.

  7. Enter a name for the token and select the roles you want to assign to the token. Press the Generate Token button.

  8. You can see that the token is successfully generated. You can view the list of tokens you generated by clicking the Token list button.

    Note: You need to copy the Token number from this screen as it won’t be available once you exit this screen. 

    If you want to make a token inactive, you need to select the token from the token list and press the Revoke button. 


The token you created will be required to establish a connection between SAP Document and Reporting Compliance and KSeF. To send and receive electronic documents, your system calls SAP Document and Reporting Compliance, cloud edition, and goes through a series of steps to get specific information about the authorized user who submitted the XML file. Here is how you do this if your business system is either SAP S/4HANA Cloud - Managing Communication Settings | SAP Help Portal or SAP S/4HANA and SAP ERP - Managing Communication Settings | SAP Help Portal


We hope you find this information useful. You can leave a comment on this blog or follow us for more information about SAP Document and Reporting Compliance here in SAP Community.