Obtaining authenticated user info

To obtain information about the authenticated user, you can use the /userinfo endpoint.

This is a standard OpenID Connect endpoint, and is accessible when your application requests the openid scope.

userinfo endpoint

Access user information with a valid access token:

1GET /userinfo
2Authorization: Bearer <access_token>
Environmentuserinfo Endpoint
Sandboxhttps://iam.yocosandbox.com/userinfo
Livehttps://iam.yoco.com/userinfo

userinfo response

1{
2 "user_id": "1344c7e4-e77f-4d62-a379-0da5a59c10b7",
3 "default_business_id": "1728917964856-9e7f50b8-399b-4a92-8264-4b35a7a0cbf1",
4 "business_ids": [
5 "1728917964856-9e7f50b8-399b-4a92-8264-4b35a7a0cbf1",
6 "1728916515805-3e9c6e46-b30f-4f18-82d9-94a4cbda7b7d"
7 ],
8 "user_name": "A Nother User",
9 "user_email": "another@yoco.com"
10}

The user_name & user_email fields are only available if your application requested the profile scope.