user4560: how can i get the script information for a given policyID. I am mostly interested in the "invalidAfter" Slot number.
So far i could not find any option for example by using Blockfrost API.
Background: i minted a token and appropriate policy on testnet. Never published the policy-Script. The cardanoscan is able to show it to me, question how does it work?
https://testnet.cardanoscan.io/tokenPolicy/c958da9d1ba00cbd58019a45cb1481e2ef3be4406c1d80cb3fdacf3d
Thank you and Greetings
Andro

user1231: You can't get that information, unless the creator publish it because the policy id is the hash of the policy script.
For example, here: Spacebudz policy and here Spacebudz FAQ - Is this actually an NFT
Creator already published it on pool pm, so you can find all details there.

user103: When minting a token in Cardano, we sign (witness) the transaction with the input credentials for consuming the input, and ALSO it is required to provide the minting native script (token policy) as a witness to the transaction.
We read the witnesses from the transactions on the chain and parse the script for the tokens. Unfortunately, currently, there is no easy way that you can follow to get this information.

user2335: As stated in other answers the minting policy script is used as a witness in the minting transaction and thus available on chain. Community members made tools for extracting such data. Here is a great forum post about the same question and links to different sources where you can find such scripts!
The post
All scripts onchain (credits to Brain W Bush)
You can parse the scripts in the above link by transaction hash.

4560: <p>how can i get the script information for a given policyID. I am mostly interested in the &quot;invalidAfter&quot; Slot number.
So far i could not find any option for example by using Blockfrost API.</p>
<p>Background: i minted a token and appropriate policy on testnet. Never published the policy-Script. The cardanoscan is able to show it to me, question how does it work?</p>
<p><a href="https://testnet.cardanoscan.io/tokenPolicy/c958da9d1ba00cbd58019a45cb1481e2ef3be4406c1d80cb3fdacf3d" rel="nofollow noreferrer">https://testnet.cardanoscan.io/tokenPolicy/c958da9d1ba00cbd58019a45cb1481e2ef3be4406c1d80cb3fdacf3d</a></p>
<p>Thank you and Greetings
Andro</p>
 1231: <p>You can't get that information, unless the creator publish it because the policy id is the hash of the policy script.</p>
<p>For example, here: <a href="https://pool.pm/policy/d5e6bf0500378d4f0da4e8dde6becec7621cd8cbf5cbb9b87013d4cc" rel="nofollow noreferrer">Spacebudz policy</a> and here <a href="https://v2.spacebudz.io/FAQ" rel="nofollow noreferrer">Spacebudz FAQ - Is this actually an NFT</a></p>
<p>Creator already published it on pool pm, so you can find all details there.</p>
 103: <p>When minting a token in Cardano, we sign (witness) the transaction with the input credentials for consuming the input, and ALSO it is required to provide the minting native script (token policy) as a witness to the transaction.</p>
<p>We read the witnesses from the transactions on the chain and parse the script for the tokens. Unfortunately, currently, there is no easy way that you can follow to get this information.</p>
 2335: <p>As stated in other answers the minting policy script is used as a witness in the minting transaction and thus available on chain. Community members made tools for extracting such data. Here is a great forum post about the same question and links to different sources where you can find such scripts!</p>
<p><a href="https://forum.cardano.org/t/how-to-derive-the-token-policy-script-from-the-mint-transaction/78479/2" rel="nofollow noreferrer">The post</a></p>
<p><a href="https://gateway.pinata.cloud/ipns/k2k4r8nihho5xsscbipfwm2keexys84xailkw3q665vfc71cfoyqzftf" rel="nofollow noreferrer">All scripts onchain</a> (credits to Brain W Bush)</p>
<p>You can parse the scripts in the above link by transaction hash.</p>
