question

kelvin avatar image
kelvin asked David Marginian Deactivated commented

OAuth 2.0 API Token Request - 400 Bad Request

One of the merchants keeps getting 400 Bad Request error occasionally (once every couple days). here is one of the errors:

2021-06-23 16:58:27,551 WARN - <GET request for "https://www.clover.com/oauth/token?client_id=HXA9X1EFNBVA8&client_secret=xxxxxxxx&code=cdca7538-2ed7-3db0-ff10-2e3c0ff8d6e9" resulted in 400 (Bad Request);


can you please take a look?

OAuth
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated commented

I looked into this, and the same code is being used for multiple/subsequent token requests, the code can only be used once.

1 comment
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Marginian avatar image David Marginian ♦♦ commented ·
Our request logs indicate the code is being re-used. There are multiple token requests with the same code. The first one is being made at 11:38:00 MST and that returns a 200. Then another request is made 2 seconds later (returns a 400), then another request is made at 11:50:44 (returns a 400)
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community