Skip to content
This repository has been archived by the owner on Jun 20, 2019. It is now read-only.

The grant type was not specified in the request #11

Closed
k0v4back opened this issue Mar 6, 2019 · 5 comments
Closed

The grant type was not specified in the request #11

k0v4back opened this issue Mar 6, 2019 · 5 comments
Labels

Comments

@k0v4back
Copy link

k0v4back commented Mar 6, 2019

Hello, I have one problem. When I whant to send request on this address http://api.testk0v4.xyz/oauth2/token, I have got Error 400 with code:0 and message:"The grant type was not specified in the request".
The most intresting, that on my local site all work good, but on the VDS I have this problem, and this problem appeared today.
Please, explain what the problem is, thanks.

@mtangoo
Copy link
Contributor

mtangoo commented Mar 6, 2019

You didn't specify which grant type you are dealing with. Can you post your json?

@k0v4back
Copy link
Author

k0v4back commented Mar 6, 2019

{"grant_type":"password", "username":"test", "password":"111111", "client_id":"testclient","client_secret":"testpass"}

@mtangoo
Copy link
Contributor

mtangoo commented Mar 6, 2019

How do you send it? Check if content type is set to JSON and the request is post

@k0v4back
Copy link
Author

k0v4back commented Mar 6, 2019

Thank you, I was very inattentive, I forget to write charset=UTF-8 inside Content-Type.
All in all, my header look:
Accept: application/json
Content-Type: application/json; charset=UTF-8

@k0v4back k0v4back closed this as completed Mar 6, 2019
@mtangoo
Copy link
Contributor

mtangoo commented Mar 7, 2019

You are welcome

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants