Connecting to Google OAuth 2.0

Hi, I am new to Tidbyt. I am trying to authenticate using Google OAuth 2.0. I believe I have configured everything correctly, but I am getting the following error every time when login:

calling schema handler oauth_handler: Traceback (most recent call last): in oauth_handler Error in post: expected param value for key ‘“client_secret”’ to be a string. got: ‘NoneType’

I am using the client id and client secret from Google Console

This is what I have following the example code:

res =
        url = "",
        headers = {
            "Accept": "application/json",
        form_body = dict(
            client_secret = OAUTH2_CLIENT_SECRET,
        form_encoding = "application/x-www-form-urlencoded",


I figured out after some researching. Here is how I got it to work if anyone is looking.

params = json.decode(params)

res =
        url = "",
        headers = { "Content-type": "application/x-www-form-urlencoded" },
        body = "code=" + params["code"] + "&client_id=" + params["client_id"] + "&redirect_uri=" + params["redirect_uri"] + "&grant_type=" + params["grant_type"] + "&client_secret=" + OAUTH2_CLIENT_SECRET,
1 Like