question

robert avatar image
robert asked Jeffrey Blattman edited

Is /accounts/current a reliable endpoint for determining a user?

I tried commenting on this question as a reply, but kept getting 500 errors.

I noticed the endpoint /accounts/current used in the dashboard and it's accessible in the API (though not documented from what I can gather).

Is that a valid / reliable endpoint for gathering whether a user is unique? Thank you!

REST API
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

·
Jeffrey Blattman avatar image
Jeffrey Blattman answered Jeffrey Blattman edited

If you don't find the endpoint in https://docs.clover.com/reference/api-reference-overview, it's not public.

Not exactly sure what you are trying to accomplish, but in general you need an access token for each merchant to ask questions about it.

Can you describe in more detail why you want to do that?


3 comments
10 |2000

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

robert avatar image robert commented ·

Sure! Basically, I just want to allow users to sync some customer data from/to email marketing services, etc.

A user may have access to several different Merchants, I figured prompting for an account creation (on "our" app/API's side) upon a successful access token response would allow users to see all their activated Merchants without having to use the individual link for each Merchant after they are activated.

For example, a user as an admin employee enables the app on Merchant A and Merchant B, If that user later accesses the link via Merchant A, I would like them to see Merchant B, too.

Also, as email addresses are optional for Merchant Employees, I want to grab an email for notification emails, etc.


0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ robert commented ·

I don't think what you are trying to do is possible. Tokens are tied to a merchant, not a user.

0 Likes 0 ·
Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ robert commented ·

Hmmm. What's a "user"? Is that your private concept of an entity that managers a set of Clover merchants? Or do you mean a Clover account?

It sounds like you want to present the user, given an account, with the merchants to which they are associated? I don't know of a public API to accomplish that. Our APIs are centered around having a token for a merchant, and asking questions about that merchant. It's kind of a data privacy thing... the merchant has to auth you to get information about them.

As long as you have tokens for all of the merchants of interest, you can use the employees REST APIs to retrieve the employees, and inspect their email addresses.

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