Missing username when use Auth Method for AI Endpoint

Hi
I’m trying to get a valid access token to use the Eggplant AI API.
(see http://docs.eggplantsoftware.com/EAI/api/eai-post-auth.htm).

So, when I try this with “Talent API Tester” it works. There the sendet stream is:

POST /ai/auth?bustCache=0.8456153109309181 HTTP/1.1
Content-Length: 47
Content-Type: application/x-www-form-urlencoded
Host: myhost.com
username= myUser%40myhost.com&password=myPassw

When I try the same with Eggplant Functional API it does not work. I get the error message:
{
“message” : “Missing username”
}

The sendet request is:

{authenticationtype:“None”, httpmethod:“POST”, mimeType:“application/json”, oauthToken:"", password:"******", requestbody:“password=myPassw&username=myUser%40myhost.com”, requestbodyformat:“Form Url Encoded”, myPassw:@“Content-Type:application/x-www-form-urlencoded\n”, responseBody:@"{“message”: “Missing username”}\n", responseCookies:{:}, responseHeaders:{@“Access-Control-Allow-Origin”:"", Connection:“keep-alive”, @“Content-Length”:“32”, @“Content-Type”:“application/json”, Date:“Tue, 06 Oct 2020 13:29:42 GMT”, Server:“nginx/1.17.4”}, responseTime:0.027016, statusCode:400, url:“myhost.com/ai/auth”, username:""}

What is wrong ?

Cheers

If there anybody interested. I did find the solution (or the fault).

In the header you have to set ‘Content-Type: application/x-www-form-urlencoded’ but in the body you have to set the values in the following format:

username:myUser@myhost.com
password:myPassw

Exact in this way. Otherwise you get a 400 or 403 status back.

I did first use the correct application/x-www-form-urlencoded format separated by ‘&’, with a ‘=’ between the key and the value and for Non-alphanumeric characters in both keys and values the percent encoded format. But this did not work, when I use the the API-Test Designer.

Cheers.