Login
Obtaining a session token is the main prerequisite for all the requests that you can make to the WorldServer API.
For security reasons, you need to perform a Login action before making any other public calls to the WorldServer API. The
sessionId in the response is your session token. Use this token in all the other calls that you make.
API call
<protocol>://<ws-host>:<ws-port>/ws-api/v1/login
Details
- POST method
- Content-Type in the header:
application/json - Mandatory parameters: username and password (in the JSON body)
JSON body example
{
"username":"admin",
"password":"testpassword123"
}
Response
Error messages
| Message | Status code |
|---|---|
| Required request body is missing | 400 Bad Request |
| Invalid JSON | 400 Bad Request |
| BAD_CREDENTIALS | 401 Unauthorized |
Troubleshooting
- Make sure that the JSON body of the request is valid and that you entered the correct user name and password.
- Make sure that the endpoint you are calling is correct.
- Make sure that you are using the POST method for the call.
- Make sure that the Content-Type in the header is
application/json.