Hello Mohsen,
As you have already noticed, the openModal method in the SDK does NOT support passing data. You can use board metadata to store the string there and then read it from the modal:
Write to the board metadata:
await miro.board.metadata.update({'<YOUR_APP_ID>': {"data": "hello"}}
Read from the board metadata:
await miro.board.metadata.get()
Another option would be to use the broadcastData() method:
https://developers.miro.com/docs/the-windowmiro-object#section-broadcast-data
and the listen to the BROADCAST_DATA event:
https://developers.miro.com/docs/namespace-sdk#section-event-type
However, the BROADCAST_DATA event is experimental and I have found it to not be very reliable. We are in the process of building a more robust solution.
I hope this helps.
Daniela