I was doing it wrong because I set as redirect_uri my client url instead of my api url.
Thank you very much!!