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

Error in link_token_create #40

Open
ahmontero opened this issue Jul 13, 2023 · 4 comments
Open

Error in link_token_create #40

ahmontero opened this issue Jul 13, 2023 · 4 comments

Comments

@ahmontero
Copy link

ahmontero commented Jul 13, 2023

This code:

from MergePythonSDK.hris.model.end_user_details_request import EndUserDetailsRequest
from MergePythonSDK.shared.model.categories_enum import CategoriesEnum

 end_user_details_request = EndUserDetailsRequest(
    end_user_email_address=email,
    end_user_organization_name=company_name,
    end_user_origin_id=str(user_id),
    categories=CategoriesEnum("ATS"),
)

seems to work now, but then if I use end_user_details_request to create a token:

# client is configured properly
token_api = LinkTokenApi(client)
token_api.link_token_create(end_user_details_request)

I get the error:

Status Code: 400
Reason: Bad Request
HTTP response body: {"categories":{"0":["\"{'value': 'ats'}\" is not a valid choice."]}}

I am using the latest library version: 2.3.0

@ankitd33
Copy link
Contributor

Hi! Could you try switching the line that says
categories=Categories("ATS")
to just
categories=["ats"]
and see if that works?

@ahmontero
Copy link
Author

Hi! I have the same error

@ankitd33
Copy link
Contributor

hmm interesting i tried the same thing and it worked - can you make sure you are using the newest version (2.3.0) and then send me the same code snippet and error you sent before please!

@ahmontero
Copy link
Author

Hi again. I tested it again and now it seems to be working using ["ats"]. Anyway, if I use CategoriesEnum("ATS") it fails.

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

2 participants