I have been checking out different codes, which refresh the API tokens, but for whatever reason it does not work for me. I used a third party app to generate the first (bearer and refresh) tokens and then used the refresh token from there to refresh it. Like this:
But am getting this in response:
HTTP/2 403
Anyone got any idea, what am I doing wrong?
Bash:
curl -i -X POST https://auth.tesla.com/oauth2/v3/token -H "Content-Type: application/json" -d '{"grant_type":"refresh_token","client_id":"ownerapi","refresh_token":"eyJhbGciO...","scope":"openid email offline_access"}'
HTTP/2 403
HTML:
<HTML><HEAD>
<TITLE>Access Denied</TITLE>
</HEAD><BODY>
<H1>Access Denied</H1>
You don't have permission to access "http://auth.tesla.com/oauth2/v3/token" on this server.<P>
Reference #18.12321060.1651729979.29c4eb13
</BODY>
</HTML>
Anyone got any idea, what am I doing wrong?