Setting the right context for an Outliner Operation
Overriding the context finally worked for me, with the help of this
answer:

override = bpy.context.copy()
for area in bpy.context.screen.areas:
    if area.type == 'OUTLINER':
        override['area'] = area
bpy.ops.outliner.group_operation(override, type='LINK')