question

jonathan avatar image
jonathan asked jonathan answered

Authenticating with same login for second merchant in sand environment

I am in the sand box environment. I have created two merchants for the environment. I make an authentication call using the same login for both merchants. Both authentications appear successful (I get an OAuth Token), however, on the second merchant I am getting unauthorized in the response for subsequent API calls.

Can I use the same login with more than one merchant in the test environment? Do I need to create a second login for the sand box? I assume one merchant could have more than one store, so this would be a real world scenario.

Sandbox
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.

jonathan avatar image jonathan commented ·

So, I have determined that the elements required to get the OAuth Token are loginUser, loginPassword, and ClientId. The Client Id given by Clover is the same for both test stores, so there is nothing that differentiates between the two test stores. So in reality, I am getting an OAuth token for the first store. Is there anything I can do to change this? If a merchant has more than one store, how would this affect them? Would one authentication be valid for more than one store (merchantId)? Can merchants in the production environment create more than one login?

0 Likes 0 ·

1 Answer

jonathan avatar image
jonathan answered Dan Suspended commented

OK. I found the solution. There are two phases to the authentication process. In the first phase, we are logging in. In the second phase, we are getting the access token. We can specify at this point for which merchant we are trying to retrieve the access token.

10 |2000

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