Replies: 1 comment 1 reply
-
I'm not following your use case. If you're using OAuth (which you have to be to use scoped endpoints) you already have the userID, it's part of the access token. At which point you can already get the users shopID from the getShopByOwnerUserId endpoint which only requires API key auth. I always assumed getMe was introduced so developers had an convenient way to get userID/ShopID in a single call rather than extracting the ID from the token and getting a sizeable response object from getShopByOwnerUserId when they may not need or require any of the additional info and were simply looking to get the shopID alone. The APIs primarily provide shop related or seller related information, what endpoints do you see your non-shop owning customers using? |
Beta Was this translation helpful? Give feedback.
-
Brief
I propose that the scope for this endpoint be changed from
shops_r
toemail_r
.Detail / Use Case
When attempting to use this endpoint under the authorization of a user that does not have a shop (i.e. a customer) the endpoint returns a
404
response with the error:Could not find a shop for User with user_id = <userId>
. 😿To me it seems the purpose of this endpoint is to introspect the identity of the authorized user, but instead it's polluting the
user
resource with theshops
concept. Further, thev3/application/users/{user_id}/shops
endpoint already exists to return the shops owned by a given user.Proposal
I propose the scope for the
getMe
resource be changed toemail_r
and return as it's body only{ "user_id": "string" }
.Alternative
If there is another way I've missed to introspect the identity of the authorized user (
user_id
and/orprimary_email
) using their access token please let me know as this is integral to my use case / app functionality.Thank you! 🖖
Beta Was this translation helpful? Give feedback.
All reactions