david29
September 29, 2022, 1:40am
1
I can’t seem to get a create user request to work. I’m getting a 400 Bad Request reply every time.
I assume it’s due to the body parameter being wrong in some way, but there seems to be no way for me to know what’s wrong with it.
My example:
$management->users()->create(“Username-Password-Authentication”, [ “email” => “tj@inthooz.com ”, “phone_number” => “+199999999999999”, “password” => “H6e>@i9KZmVd}'S;”, “email_verified” => true ] );
david29
September 29, 2022, 1:55am
2
Scratch that. I figured it out!
I wasn’t using the HttpResponse::decodeContent() method on the response. That’s why I didn’t get any useful feedback.
Once I added that, the API helpfully told me that the phone number was not allowed.
2 Likes
Thank you for sharing your solution with us!
system
Closed
October 14, 2022, 7:39pm
4
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.