Valori pentru obținerea tokenului Oauth pentru aplicația ROA
Grant Type	Authorization Code
Callback URL	["https://oauth.pstmn.io/v1/callback"]
Auth URL	https://logincert.anaf.ro/anaf-oauth2/v1/authorize
https://logincert.anaf.ro/anaf-oauth2/v1/token
https://logincert.anaf.ro/anaf-oauth2/v1/revoke
Client ID	fa4b103cc97928453a346427fb380023e996dd8299190663
Client Secret	9bd2428add6f480a1bd626a2a376d354ef20b580ef340023e996dd8299190663
------------------------

Valori pentru obținerea tokenului Oauth pentru aplicația ROA2
Grant Type	Authorization Code
Callback URL	["https://romfast.ro/oauth2/","https://oauth.pstmn.io/v1/callback"]
Auth URL	https://logincert.anaf.ro/anaf-oauth2/v1/authorize
https://logincert.anaf.ro/anaf-oauth2/v1/token
https://logincert.anaf.ro/anaf-oauth2/v1/revoke
Client ID	f4c59081e488ac326f32f8ab52620023e996dd82d7d01163
Client Secret	e65b9127acac254c5b9bfbbe68b9a6ca07b0d6df6dbb0023e996dd82d7d01163

https://logincert.anaf.ro/anaf-oauth2/v1/authorize?client_id=f4c59081e488ac326f32f8ab52620023e996dd82d7d01163&client_secret=e65b9127acac254c5b9bfbbe68b9a6ca07b0d6df6dbb0023e996dd82d7d01163&response_type=code&redirect_uri=https://romfast.ro/oauth2/


---------------------------------------
Copiati ANAF Access Token de pe linia urmatoare si completati-l in aplicatia eFactura

9c38ee4f4d40e743cf1ecc4e1721710c203b2c37011a481959bf0a9aeaae9136

refresh_token: 63141bba21a1a27d63d5d3b6b10432808db6db8672c2956e914476bff245c0be
---------------------------------------

-------------------
Token Details
Token Name: ROA ANAF
Access Token: 9b1f44af738c16aa10c78347b9a064857f034b03a20704a03c131b99f019cee5
Token Type: Bearer
expires_in: 7776000
scope: clientappid info issuer role serial
refresh_token: 2efe39577382e2e31b42cfc1b772c737fe108c67390d463a7e2bb9f7b4bed3ae



-------------
Copiati ANAF Access Token de pe linia urmatoare si completati-l in aplicatia eFactura

afcd8053b27c04b361375b6f2e8a5ccae022c5b8409fe21907081eb831ad325f

refresh_token: a14a7d02b48a86fa0feae6cf0d5d936a61476cd3c5115d07e58ab22749679104
-----------------
curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d "grant_type=authorization_code&code=362ad374-735c-4f69-aa8e-bf384f8602de&redirect_uri=http://example.com/oauth&client_id=myClientID&client_secret=myClientPassword" http://host1.example.com:8080/openam/oauth2/access_token

curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d "grant_type=refresh_token&refresh_token=534310ab-570b-4eb4-0ed7-d01d243fae21&client_id=myClientID&client_secret=myClientPassword" http://host1.example.com:8080/openam/oauth2/access_token


curl -k -v -X POST -H 'Content-type: application/x-www-form-urlencoded' -d "client_id=mytestclient&scope=read&grant_type=password&username=testuser1&password=passw0rd" https://<reverse_proxy_hostname>/mga/sps/oauth/oauth20/token

---------------

lcFile = GETFILE()
lcSend = FILETOSTR(m.lcfile)

lcServer =[https://api.anaf.ro/test/FCTEL/rest/upload?standard=UBL&cif=1879855]
loHTTP = Createobject('winHTTP.winHTTPrequest.5.1')
loHTTP.Open('POST', lcServer, .F.)
loHTTP.setRequestHeader("Content-Type", "application/xml;")
loHttp.SetRequestHeader('Authorization', 'Bearer 9b1f44af738c16aa10c78347b9a064857f034b03a20704a03c131b99f019cee5')
loHttp.Send(m.lcSend)
MESSAGEBOX(loHttp.Status)
MESSAGEBOX(loHttp.ResponseText)
-----------
factura acn 30.09.2022
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<header xmlns="mfp:anaf:dgti:spv:respUploadFisier:v1" dateResponse="202209301429" ExecutionStatus="0" index_incarcare="4010894328"/>

factura directia 03.10.2022

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<header xmlns="mfp:anaf:dgti:spv:respUploadFisier:v1" dateResponse="202210040014" ExecutionStatus="0" index_incarcare="4011246826"/>


-----------------
https://api.anaf.ro/prod/FCTEL/rest/stareMesaj?id_incarcare=4010894328
-----------------
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<header xmlns="mfp:anaf:dgti:efactura:stareMesajFactura:v1" stare="ok" id_descarcare="3019427541"/>

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<header xmlns="mfp:anaf:dgti:efactura:stareMesajFactura:v1" stare="in prelucrare"/>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<header xmlns="mfp:anaf:dgti:efactura:stareMesajFactura:v1" stare="ok" id_descarcare="3020001158"/>

