Generating an Authorization Token in Romania’s ANAF Portal Using Postman
2023-10-27 03:12:50 Author: blogs.sap.com(查看原文) 阅读量:27 收藏

In this blog post, we will guide you through the process of generating an authorization token from Postman and ANAF’s portal. This authorization token is essential for establishing a connection between SAP Document and Reporting Compliance and ANAF, allowing you to monitor the eDocuments you’ve submitted to ANAF.

Firstly, it’s important to note that while the steps mentioned in this blog post are based on the current ANAF portal process, they may become outdated if ANAF’s procedures change.

ANAF, which stands for Agenția Națională de Administrare Fiscală (National Agency for Fiscal Administration), enables you to electronically send and receive eInvoices through their e-Invoicing platform.

Before you proceed, ensure that you meet the following prerequisites:

  1. You should be a registered user on the ANAF portal with a qualified digital certificate, holding one of the SPV PJ rights (legal representative, designated representative, or authorized representative). You can register in the SPV by visiting this link: https://www.anaf.ro/InregPersFizicePublic/#tabs-2.
  2. After completing the registration process on the ANAF portal, you will receive a Client ID and Client Secret, which are required for the subsequent steps.

Now, let’s go over the management URLs used for generating the authorization token:


Once you are registered on the ANAF portal, follow these steps to generate an authorization token:

  1. Open Postman and create a GET operation for the Authorization Endpoint.
  2. Under the Authorization tab, complete the required fields as shown below:
    Grant Type Authorization Code
    Callback URL <Use the default URL generated by Postman>
    Auth URL https://logincert.anaf.ro/anaf-oauth2/v1/authorize
    Access Token URL https://logincert.anaf.ro/anaf-oauth2/v1/token
    Client ID <Enter the Client ID received during the registration process>
    Client Secret <Enter the Client Secret received during the registration process>
    Client Authentication Send as Basic Auth Header

    – Check the ‘Authorize using Browser’ checkbox.

  3. Click the ‘Get New Access Token’ button.
  4. Since you’ve checked ‘Authorize using Browser’ in step 2, your browser will automatically open, and you will be prompted to select your certificate for authentication.
  5. After a successful authentication, provide your ANAF portal username and password as prompted by the browser and click the ‘OK’ button.
  6. A new token will be generated, and you will see a success message in the browser.
  7. You will be automatically redirected back to Postman with a popup displaying the newly generated authorization token. Click the ‘Use Token’ button.
  8. The new token will automatically populate the token field.
  9. Use this newly generated token in your BTP portal configuration for eDocument exchange between the SAP system and the Romania Tax Authority.

Please note that the steps and processes described here are accurate as of the time of writing, but it’s essential to stay updated with any changes on the ANAF portal that may affect this procedure.


文章来源: https://blogs.sap.com/2023/10/26/generating-an-authorization-token-in-romanias-anaf-portal-using-postman/
如有侵权请联系:admin#unsafe.sh