Getting missing grant type while refresh token

Hi
I am trying to refresh oauth token via curl/python. But getting 400 and weird error. Below is the mentioned curl command that i have been trying.

curl --request POST
–url https://zoom.us/oauth/token
–header ‘Authorization: Basic {base64encoded(client_id:client_secret)}’
–data ‘{“grant_type”:“refresh_token”,“refresh_token”:"{refresh token}"}’

result that i am getting

{“reason”:“Missing grant type”,“error”:“invalid_request”}

Help please.

Thanks,
Sachin

Hey @sachinm,

You are sending the grant type in the body instead of the query param. :slight_smile:

It should be changed to this:

https://zoom.us/oauth/token?grant_type=refresh_token&refresh_token=eyJhbGciOiJIUzUxMiIsInYiOiIyLjAiLCJraWQiOiI8S0lEPiJ9.eyJ2ZXIiOiI2IiwiY2xpZW50SWQiOiI8Q2xpZW50X0lEPiIsImNvZGUiOiI8Q29kZT4iLCJpc3MiOiJ1cm46em9vbTpjb25uZWN0OmNsaWVudGlkOjxDbGllbnRfSUQ-IiwiYXV0aGVudGljYXRpb25JZCI6IjxBdXRoZW50aWNhdGlvbl9JRD4iLCJ1c2VySWQiOiI8VXNlcl9JRD4iLCJncm91cE51bWJlciI6MCwiYXVkIjoiaHR0cHM6Ly9vYXV0aC56b29tLnVzIiwiYWNjb3VudElkIjoiPEFjY291bnRfSUQ-IiwibmJmIjoxNTgwMTQ2OTkzLCJleHAiOjIwNTMxODY5OTMsInRva2VuVHlwZSI6InJlZnJlc2hfdG9rZW4iLCJpYXQiOjE1ODAxNDY5OTMsImp0aSI6IjxKVEk-IiwidG9sZXJhbmNlSWQiOjI1fQ.Xcn_1i_tE6n-wy6_-3JZArIEbiP4AS3paSD0hzb0OZwvYSf-iebQBr0Nucupe57HUDB5NfR9VuyvQ3b74qZAfA

Please see our docs here on how to properly form a refresh url:

https://marketplace.zoom.us/docs/guides/auth/oauth#refreshing

Thanks,
Tommy