Skip to main content
Question or a Poll
Q&A (Help Needed)
Marcus WongKeboola TEAM
Headmaster of Keboola Academy, School for Data Witchcraft and Wizardry
Asked a question 2 years ago

How can I have a stable Generic Extractor configuration with OAuth2 authentication?

Where am I?

In Keboola you can ask and answer questions and share your experience with others!

Martin FiserKeboola TEAM
Head of Professional Services @ Keboola

Hi Marcus,

I suggest checking out the help section on OAuth2.0:
https://developers.keboola.com/extend/generic-extractor/configuration/api/authentication/71

OAuth 2.0 Authentication is one of two OAuth methods31 and is supported only for published components35. To develop and test a new component with the OAuth authorization, go through steps all steps manually. At step of "granting access token", you will obtain a response which needs to be put in the authorization.oauth_api.credentials.data section of the configuration.

After having the final working configuration, please create a support ticket and ask for component registration. We would ideally need both working config and the link to the API documentation.

For instance, the example configuration might be as following:

{
    "parameters": {
        "api": {
            "baseUrl": "https://example.com/29",
            "authentication": {
                "type": "oauth20",
                "headers": {
                    "Authorization": {
                        "function": "concat",
                        "args": [
                            "Bearer ",
                            {
                                "authorization": "data"
                            }
                        ]
                    }
                }
            }
        },
        "config": {
            "jobs": [
                {
                    "endpoint": "users",
                    "dataType": "users"
                }
            ]
        }
    },
    "authorization": {
        "oauth_api": {
            "credentials": {
                "#data": "SomeToken1234abcd567ef",
                "appKey": "clientId",
                "#appSecret": "clientSecret"
            }
        }
    }
}

More info in the official developer documentation here:

https://developers.keboola.com/extend/generic-extractor/configuration/api/authentication/oauth20/81

and for OAuth login here:

https://developers.keboola.com/extend/generic-extractor/configuration/api/authentication/oauth20-login/68