Sage 300 WebAPi Authentication not working

SOLVED

Hi I want to learn how to use the WebAPI but I'm not able to authenticate. I always get an authentication error when I try to access any endpoint.

This is what I did.

Sage 2019 SQL Server 2014 on Server 2016.
The web api feature has been installed and I can see it in the IIS console. If I open the Swagger UI in Internet explorer everything loads up fine.

And If I visit an endpoint directly a username and password box pops up. I also created a user called WEBAPI with password WEBAPI, assigned super permissions to the WEBAPI user including access to the Web API in all modules that I could. I also enabled allow Admin to log in via the web.config (There's another file in the root which I allowed Admin, can't remember the name now)  restarted IIS, rebooted the server still not working. I entered the username/password in combinations of upper and lower case. (I think it has to be uppercase)

I then assigned permissions to the main installation directory of Sage300 (C:\Sage300) I added my account, Administrator and everyone with full read/write/modify permissions.

I also tried to change the user in IIS to administrator and it also didn't work.

The exact error from the C:\Sage300\Online\WebApi\Logs trace.log file is

----------------------------------------
Timestamp: 4/27/2019 6:14:14 PM
 Message: Error-[Tenant:] [Company:] [Module:] [User:] - Sage 300 Web API encountered an error for Url 'localhost/.../ICLocations'.:
Exception Source:      
Exception Type:        System.UnauthorizedAccessException
Exception Message:     Attempted to perform an unauthorized operation.
---- Stack Trace ----

 Machine Name: TESTENV01

If I visit the endpoint localhost/.../ICItems in a browser, after entering the username and password U:WEBAPI P:WEBAPI or ADMIN:ADMIN I get the below response.

{
  "error": {
    "code": "Unauthorized",
    "message": {
      "lang": "en-US",
      "value": "Authentication error from invalid credentials."
    }
  }
}

FYI I made sure the WEBAPI user was created  SAMINC and not SAMLTD which is the default company when "Trying" from the Swagger UI

There isn't much info out on google about this issue and I only run into unanswered  threads , I'm out of Ideas.