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

Wrong value in API #568

Closed
notesjor opened this issue Mar 27, 2023 · 2 comments
Closed

Wrong value in API #568

notesjor opened this issue Mar 27, 2023 · 2 comments
Assignees
Labels
Milestone

Comments

@notesjor
Copy link

I tried this: https://github.com/KorAP/Kustvakt/wiki/Service:-Virtual-Corpus-Creation

Example:

curl --request PUT "https://korap.ids-mannheim.de/api/v1.0/vc/~owid/test" --header "Authorization: Bearer XXX" --header "Content-Type: application/json" --data "{"type": "PRIVATE", "corpusQuery": "corpusSigle=GOE & creationDate since 1820"}"

Please replace the following information

  • User: owid
  • Virtual-Corpus-Name: test
  • Bearer Token: XXX

Get this error:
{
"errors": [
[
2010,
"Unauthorized operation for user: MAIL",
"MAIL"
]
]
}

Problem: MAIL is the e-mail of user owid (I have replaced this info here with MAIL). I would expect the username here, not the email address. That's creepy. The problem: I need to specify the email for both creating and retrieving sub-corpus information.

As mentioned in #566, I do not have access to this info.

I see two solutions here:

  1. use the user name here instead of e-mail.
  2. more complicated - and ugly, with OAuth2, developers don't want to see any detailed information such as e-mail. modify the VC documentation (MAIL instead of username) and then send username and MAIL - see Endpoint for requesting basic information about the currently logged in user #566
@margaretha
Copy link
Contributor

Thanks for reporting the bug. That is really bad. The virtual corpus services have not been integrated in the Web-UI thus not tested very often. It used to show only username. This must have been caused by the synchronization of username and emails.

@margaretha margaretha added this to the Version 0.69.3 milestone Mar 31, 2023
@margaretha
Copy link
Contributor

We have switched to using usernames instead of emails in aa87e20 and d5fb949.

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

No branches or pull requests

2 participants