I’m using this nuget in visual studio: https://github.com/Acumatica/AcumaticaRESTAPIClientForCSharp/
Trying to set up a very basic bambooHR - Acumatica integration to create leave requests from bamboo as timeEntries in Acumatica.
When I log in with just a username and password, everything works and it logs me into our live tenant. When I use my local offline demo vm I have no tenants to test with also.
I want to log into our test tenant, but when I specify the test tenant and branch I get a Server error 500 - internal server error.
Has anyone else run into this before?
In my main program I have:
myAcumaticaStuff.Login(AcumaticaBaseUrl, "ApiLogin", "******", "Staging", "Edmonton", "en-CA")
The sub in the module:
(myauthApi is from: Imports Acumatica.Auth.Api)
Public Shared Sub Login(siteURL As String, username As String, password As String, Optional tenant As String = Nothing, Optional branch As String = Nothing, Optional locale As String = Nothing)
myauthApi = New AuthApi(siteURL)Try
Dim loginRequest As New Credentials(username, password, "", tenant, branch, locale)
myauthApi.LogIn(loginRequest)
Console.WriteLine("Login successful!")
Catch ex As ApiException
Console.WriteLine("An error occurred: " + ex.Message)
End TryEnd Sub
I’ve tried to use the tenant ID instead of its name but I get the same error.