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

EU API not supported #80

Open
ryan-mcaleer opened this issue Jul 31, 2024 · 1 comment
Open

EU API not supported #80

ryan-mcaleer opened this issue Jul 31, 2024 · 1 comment

Comments

@ryan-mcaleer
Copy link

ryan-mcaleer commented Jul 31, 2024

EU is not supported

https://www.typeform.com/developers/get-started/responses-data-center/#authorization

@ryan-mcaleer
Copy link
Author

ryan-mcaleer commented Jul 31, 2024

looking through the code of the tap itself, seems like a very easy fix.... to allow the specification of the environment in the config json file, and using this to determine the api URL in the client class

however as most people seem to be using the tap through Stitch (including my own team) - not sure how changes to the stitch integration could / would get prioritized

class Client(object):
    """
    The client class is used for making REST calls to the Github API.
    """
    BASE_URL = 'https://api.typeform.com'
    EU_BASE_URL = 'https://api.eu.typeform.com'
    OAUTH_URL = 'https://api.typeform.com/oauth/token'

    def __init__(self, config, config_path, dev_mode):
        ...
        self.typeform_url = self.EU_BASE_URL if config.get('typeform_environment') == 'eu' else self.BASE_URL
        ...
        
    def build_url(self, endpoint):
        """
        Returns full URL for a given endpoint.
        """
        return f"{self.typeform_url}/{endpoint}"

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

1 participant