Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Authentication >

Generating Refresh Token via UiPath

Started by Ace Alderbot -   in API Authentication

Hi,

1. We have been using Xero refresh token generation using Postman and one of the other RPA software, and it was working as expected
2. Now trying to implement the same using other RPA software where it is failing with 400. I am really struggling to understand what is causing this
3. Please find the required info below and help
- Using HTTP request with POST for "https://identity.xero.com/connect/token"
- Passing parameters as JSON string
{
"grant_type": "refresh_token",
"refresh_token": current refresh token generated today and not used till now as string,
"client_id": client ID from app as string,
"client_secret": Client secret from app as string
}
4. No other parameters passed or used
5. Few observations:
- when configuring HTTP request I see end point URL "https://identity.xero.com/connect/token" is getting changed to "https://identity.xero.com/connect/token/" in preview part
- If I do preview it is giving response code as 200 but generating html code and which is authentication login page
- If I call HTTP request with out trailing slash is giving response as 400 bad request
- Just to try I have used end point URL with trailing slash which is matching preview result with 200 response

Any ideas why 400 with end point url with out trailing slash or how can I stop this happening?

Regards,
Vijay