-
-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Directus Auth - 400 bad request using rest client but functional old school way?? #248
Comments
Hey dude, what's the code of that JSON class? |
Hey, so I did try thinking something similar, however it still did not work, but it is this asset If it helps, if you add me on discord .muttley I can give you a username/password and my real domain so you can test too. |
Hey mate, as I know Body is only going to work with Serializable classes using the Unity utility internally, if you want to use another tools for JSON serialization I recommend using BodyString attribute instead 🫡 |
So even if i change the body to this I still get HTTP/1.1 Bad Request. In the interest of trial and error, I have made it like this, the same json code that works with the mentioned example above.
|
Okay so here is the full class code, hopefully it can help
I have AuthenticateUser() which works fine, that runs, and then i fetch data no issues, however trying to use AuthenticateUserRest always gets a 400 error, no matter what way i provide it the body, I get the same error, I changed how I gave it the content type, retries, everything I am at a loss. |
Just bumping this as still got same issue and can't find a fix |
@kiritodragneel care to share it as a toy project? Willing to help you, but it taks quite a while to setup the excat same thing. GitHub would be best way to share your project (Only share the necessary part). Thanks. |
Hey, so I am trying to connect and get an access Token from my directus instance.
If I use this code the code below then I get a 400 bad request error.
However if i use this snippet then it works without issue
The text was updated successfully, but these errors were encountered: