I am running a script on a Cloudpage and want to send data to one out of a set of cloudpages, chosen by a given logic. The target Cloudpage URLs follow a schema, and I know the target URLs. Say: https://www.mysubdomain.domain.com/page1" / "https://www.mysubdomain.domain.com/page2" / "https://www.mysubdomain.domain.com/page3"
However, I want to send data with the CloudPagesURL() function to leverage its native encryption capabilities. CloudPagesURL works with the Cloudpage's ID however, and they have no schema at all. Say "1234", "7890", "5678".
So I'd need to get the right page via:
And I have found no way to find this number with the API or similar.
Is there a way to programmatically retrieve a CloudPage's ID by its URL? Or any other means (content, location,...)
I have tried using:
as 205 is the ID for a "web page" asset. It does return cloudpages, but neither does the response list the Cloudpage ID (1234) nor the URL.
If there is no solution, my other workaround would be setting up my own encryption with encryptSymmetric / Decryptsymmetric and post to the URLs instead.