Signing token for embedding with entity ID instead of ID

I'm trying to use entity id when signing a JWT token to display an embed iframe. Because I export/import dashboards and ids are not the same when that is done.

My current setup is:

    payload = {
        'resource': {'dashboard': 11},
        'params': {},
        'exp': round(time.time()) + 60,
    }
    token = jwt.encode(payload, METABASE_SECRET_KEY, algorithm='HS256')
    iframe_url = f"{METABASE_SITE_URL}/embed/{page_data['type']}/{token}"

which works fine. But I would like to use entity id instead of id (11), because that is different between environments. I tried using "eid:B7Y8TVbKsVBAEqwvn2R0W" and "entity_id:B7Y8TVbKsVBAEqwvn2R0W" but got a "problem looking up id from entity_id" error in the iframe. Is there a way to do this or do I have to use the API to find actual id from entity id first?

Well, I'm an idiot. You just pass the entity id instead of id. In my case "B7Y8TVbKsVBAEqwvn2R0W" instead of "11". That's all.