i trying generate acces token refresh token in django. using oauth2. using oauth2 internal url generating access token i.e, 127.0.0.1:8000/o/token/ testing in rest console.
my request is:
{ "client_id": "m5jjazkqocdh9mc4kv9eajkunhdmv2tyndxgd6t7", "client_secret": "6c495r1bia0lfxgm7lh0zvqc6ugb7h6srlwsclwyvngokqk7xgvqbb63hj97e7fw3twigg7tnv9k5nwinakpaaqsy4flm8jabdtpz8yzlcjmkuiwnbiwc0ltfb7h9cgq", "username": "lalit198910", "grant_type": "refresh_token", "token type" : "bearer", "refresh_token": "1svshogo5tq6uxkiy55imvmpwngrsn" } the error getting is:
"error": "unsupported_grant_type" my content type :
application/x-www-form-urlencoded in custom headers have :
authorization type: bearer value :3nkksw9tepjusuy2pzkhfxotkflqqc(access token)
i have solved problem, using raw body pass request data instead of using request paramters
Comments
Post a Comment