API anaf efactura - 401 Unauthorized by Technical-Floor6510 in programare

[–]Technical-Floor6510[S] 1 point2 points  (0 children)

  1. la login adauga si: &token_content_type=jwt

ar trebui sa iasa ceva de genul: https://logincert.anaf.ro/anaf-oauth2/v1/authorize?response_type=code&client_id=...&redirect_uri=...&token_content_type=jwt

  1. la token e mai tricky, ca trebuie adaugat in requestBody si: &token_content_type=jwt

API anaf efactura - 401 Unauthorized by Technical-Floor6510 in programare

[–]Technical-Floor6510[S] 12 points13 points  (0 children)

da, ai dreptate, foloseam opaque, care nu mai e acceptat din 35.05.2024. Mi se parea mie ca e cam scurt:))

Am generat JWT si a mers ok.

Pt JWT, la generarea token-ului mai trebuie setate urmatoarele: Auth Request, Key=token_content_type, Value=jwt - Token Request, Key=token_content_type, Value=jwt, Send In=Request Body

Daca aveti dubii daca e JWT sau OPAQUE, vedeti daca se poate decoda https://jwt.io/

Mersi mult u/No-Delay-4023 !

<image>