XF 2.2 Problems with API endpoint : users/find-name

BubbaLovesCheese

Active member
Hi,

I'm having a some problems getting the users/find-name endpoint to work.

I am using postman.co to test the API response.

my URL is https://test.mywebsite.com/api/users/find-name
my key is username
my value is MyUserName
description is What Do I put Here?

Is there something wrong with the syntax?

My error message is:

Code:
{
    "errors": [
        {
            "code": "required_input_missing",
            "message": "Required input missing: username",
            "params": {
                "missing": [
                    "username"
                ]
            }
        }
    ]
}





 
Nothing looks wrong. I assume your API key is correct, it should work ok. The description field is irrelevant.
Make sure you don't have space in the key text "username". Like "username " or " username".

1603518505974.webp
 
I gotcha. Thanks. It now works. I should have noticed that. :)

So an aside question.... Do all GET request require values filled out in the Params section, and POST requests need the valued defined in the Body?
 
I gotcha. Thanks. It now works. I should have noticed that. :)

So an aside question.... Do all GET request require values filled out in the Params section, and POST requests need the valued defined in the Body?
Good to hear that.

Yes, you send a form with POST request. Query parameters on the other side, with GET request.
 
Top Bottom