Hello MarineL,
You can try to use PublishData task for that:
publish = Metashape.Tasks.PublishData()
publish.service = Metashape.ServiceType.ServiceSketchfab
publish.source_data = Metashape.DataSource.ModelData
publish.title = "Model title"
publish.description = "Model description"
publish.is_draft = False
publish.is_private = False
publish.token = "*****"
publish.apply(chunk)
You may modify it to ask for the token value:
token = Metashape.app.getString("Please, input Sketchfab API token:")
so that you do not need to keep the sensible information in the script body.