statusCode 400 on API Request - Bad Request - Client Secret

Posts about the simPRO API. Help/support/how-to etc.
Forum rules
  • Check the documentation first. Before posting questions, please check the documentation to ensure it doesn't already cover what you need.
  • No spam. All automated messages, advertisements, and links to competitor websites will be deleted immediately.
  • Post in relevant sub-forums only. Messages posted in the wrong topic area will be removed and placed in the correct sub-forum by moderators.
  • Respect other users. No flaming or abusing fellow forum members. Users who continue to post inflammatory, abusive comments will be deleted from the forum after two warnings are issued by moderators.
  • Harassment. No threats or harassment of other users will be tolerated. Any instance of threatening or harassing behavior is grounds for deletion from the forums.
  • Adult content. No profanity or pornography is allowed. Posts containing adult material will be deleted.
  • Bandwidth. All images and signatures must be 500 x 500 pixels or smaller. Posts containing over-sized images and signatures will be removed.
  • Illegal content. No re-posting of copyrighted materials or other illegal content is allowed. Any posts containing illegal content or copyrighted materials will be deleted.
Post Reply
aaron.rose
Posts: 2
Joined: Thu Sep 07, 2023 3:28 am

statusCode 400 on API Request - Bad Request - Client Secret

Post by aaron.rose » Thu Sep 07, 2023 3:45 am

Afternoon Team,

Could you please assist with an urgent issue we are experiencing with our 3rd party application integration into SimPRO?

We are currently experiencing statusCode 400 errors regarding bad requests made through existing integrations into our other 3rd party applications via the API. We have a variety of applications that have integration with our SimPRO suite which use different credentials and platforms that are all impacted.

The body of the POST request is:

Request URL:
https://<company>.simprosuite.com/oauth2/token

Request Body:
{
"grant_type": "client_credentials",
"client_id": "client id",
"client_secret": "client secret"
}

A copy of the response below:
Response from /oauth2/token with our previously generated credentials is
{"error":"invalid_client","error_description":"The client credentials are invalid"}

Please note - this impacts all existing client secrets, however, we were able to create and use a new one without issues. We appreciate your swift response and guidance as this has impacted BAU. Please advise on how we can open a line of communication to get this rectified.

Are you aware of any issues with this function?
Sindre
Posts: 493
Joined: Wed Apr 20, 2022 4:51 am
Location: Brisbane

Re: statusCode 400 on API Request - Bad Request - Client Secret

Post by Sindre » Thu Sep 07, 2023 5:35 am

Hi aaron,
Have these integrations worked fine earlier using the same code to authentice?

The tokens received are valid for one hour, could something be wrong with your code fetching a new access token?

Can you try the same authentication method using your credentials in an API tool such as Postman to see if you receive the same errors?

Regards
Sindre
API Developer | Simpro Software Group
aaron.rose
Posts: 2
Joined: Thu Sep 07, 2023 3:28 am

Re: statusCode 400 on API Request - Bad Request - Client Secret

Post by aaron.rose » Thu Sep 07, 2023 6:30 am

The code has not be altered between being functional and non-functional. This is quite surprising to multiple departments. We have SimPRO integrations with Microsoft, JIRA, and other services, including tests in postman that are all impacted. As mentioned, the requests are fine when creating new client profiles to run as. It's as if something has happened to our existing connections.
Sindre wrote: ↑Thu Sep 07, 2023 5:35 am Hi aaron,
Have these integrations worked fine earlier using the same code to authentice?

The tokens received are valid for one hour, could something be wrong with your code fetching a new access token?

Can you try the same authentication method using your credentials in an API tool such as Postman to see if you receive the same errors?

Regards
nige
Posts: 23
Joined: Wed Jun 24, 2020 11:05 pm

Re: statusCode 400 on API Request - Bad Request - Client Secret

Post by nige » Thu Sep 07, 2023 9:33 pm

Hi aaron

we have responded to you directly by email.

Regards
Post Reply