Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how can I get user email and icon #2

Open
flufy3d opened this issue Mar 18, 2019 · 5 comments
Open

how can I get user email and icon #2

flufy3d opened this issue Mar 18, 2019 · 5 comments

Comments

@flufy3d
Copy link

flufy3d commented Mar 18, 2019

this only get user id ,how can I get user email and head icon?

moneyButtonClient.requestAuthorization(
  "auth.user_identity:read",
  OAUTH_REDIRECT_URI
)
@flufy3d
Copy link
Author

flufy3d commented Mar 18, 2019

I try to call getUser funtion but it's failed
async getUser (userId) { let json = await this._doGetRequest(/v1/users/${userId}) return fromResourceObject(fromJsonApiData(json), 'users') }

@flufy3d
Copy link
Author

flufy3d commented Mar 18, 2019

{"errors":[{"id":"1edf44b0-49ce-11e9-b9cf-77931a14c086","status":401,"title":"Unauthorized","detail":"Insufficient scope: authorized scope is insufficient"}],"jsonapi":{"version":"1.0"}}

@Lava-Lamp
Copy link

did you find a solution?

@GHChrisSu
Copy link

found solution on telegram

Wian Koch, [Oct 9, 2019 1:16:45]:
here is my scope:
"auth.user_identity:read" + " " + "users.profiles:read"

then I use this code to get user Identity:
const { id: userId, name } = await client.getIdentity();

then I use this line to get user Profile:
const profile = await client.getUserProfile(userId);

but i get this error:
"Insufficient scope: authorized scope is insufficient"

i get the Id and the name but not the profile...

@GHChrisSu
Copy link

space split

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants