java.io.IOException: Server returned HTTP response code: 400

I have solved the problem.
The correct gant_type for me was refresh_token.
The problem was that the refresh_token can only be used once.
With the access_token you get a new refresh_token that you have to use for the next access_token.

1 Like