Skip to main content
Solved

Rest API

  • December 16, 2022
  • 8 replies
  • 2460 views

Forum|alt.badge.img

I am trying use the Login to Acumatica Rest API with Postman. 

​​According to the documentation I have found in the web, I should be using http://MyCompany.acumatica.com/entity/auth/login as URL

 

The body as detailed below:

{
"name":"johnd",
"password":"johndpassword",
"tenant":"mytenant"
}

 

I get an error in Postman as detailed below:

{"message":"An error has occurred.","exceptionMessage":"Error: Invalid credentials. Please try again.","exceptionType":"PX.Data.PXException","stackTrace":" at PX.Data.PXLogin.LoginUserImpl(HttpContext httpContext, String userName, String password)\r\n

What am I doing wrong?

Best answer by Kulvir Kaila

Your url looks correct but you might need to specify the branch in your JSON payload.  Also noticed you are using the keyword tenant instead of company.

{

"name" : "{{name}}",

"password" : "{{password}}",

"company" : "{{company}}",

"branch" : "{{branch}}"

}

 

View original
Did this topic help you find an answer to your question?

8 replies

Forum|alt.badge.img+2

Hi @RafaDiazBAI 

The request looks fine. Are you able to login using these credentials in the browser /UI?


Forum|alt.badge.img
  • Author
  • Freshman II
  • 12 replies
  • December 16, 2022

Yes, I am able to login with the same credentials in the browser/UI


Kulvir Kaila
Jr Varsity I
Forum|alt.badge.img+1
  • Jr Varsity I
  • 61 replies
  • Answer
  • December 16, 2022

Your url looks correct but you might need to specify the branch in your JSON payload.  Also noticed you are using the keyword tenant instead of company.

{

"name" : "{{name}}",

"password" : "{{password}}",

"company" : "{{company}}",

"branch" : "{{branch}}"

}

 


Forum|alt.badge.img
  • Author
  • Freshman II
  • 12 replies
  • December 16, 2022

Thanks! Issue solved.

 

 


@RafaDiazBAI can you please share the documentation you have mentioned above? 
Thanks.


RohitRattan88
Acumatica Moderator
Forum|alt.badge.img+4
  • Acumatica Moderator
  • 253 replies
  • May 1, 2023

@osamaaslam49  you could search it on help.acumatica.com

Acumatica


Forum|alt.badge.img
  • Author
  • Freshman II
  • 12 replies
  • May 8, 2023

  • Freshman II
  • 8 replies
  • June 3, 2024

Why is the Acumatica Website providing this example then?

{  "name" : "admin",  "password" : "123",  "tenant" : "MyStore",  "branch" : "MYSTORE",  "locale" : "EN-US"}

https://help-2022r2.acumatica.com/Help?ScreenId=ShowWiki&pageid=0322492a-de9b-4443-b256-923c48aff31d

 

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings