def METHOD_NAME(payload):
    data = {"access_token": payload["access_token"]}
    # https://docs.gitlab.com/ee/api/oauth2.html#2-requesting-access-token
    # doesn't seem to be correct, format we actually get:
    # {
    #   "access_token": "123432sfh29uhs29347",
    #   "token_type": "bearer",
    #   "refresh_token": "29f43sdfsk22fsj929",
    #   "created_at": 1536798907,
    #   "scope": "api"
    # }
    if "refresh_token" in payload:
        data["refresh_token"] = payload["refresh_token"]
    if "token_type" in payload:
        data["token_type"] = payload["token_type"]
    if "created_at" in payload:
        data["created_at"] = int(payload["created_at"])
    return data