Checking actor accessibility

How to check if we have access to an actor, whether have trial access, free access or not have access at all. For example:
client = ApifyClient(os.environ['APIFY_TOKEN'], api_url=os.environ['APIFY_API_BASE_URL'])
actor = client.actor('username/actor-name') # other actor
info = actor.get()
if not info:
print('ACTOR DOES NOT EXIST')
elif not actor.haveaccess(): # mock function. do we have access to the actor ?
print('ACCESS DENIED')
else:
print('GOOD TO GO')
main_scraper() # run current actor
client = ApifyClient(os.environ['APIFY_TOKEN'], api_url=os.environ['APIFY_API_BASE_URL'])
actor = client.actor('username/actor-name') # other actor
info = actor.get()
if not info:
print('ACTOR DOES NOT EXIST')
elif not actor.haveaccess(): # mock function. do we have access to the actor ?
print('ACCESS DENIED')
else:
print('GOOD TO GO')
main_scraper() # run current actor
2 Replies
rare-sapphire
rare-sapphire•3y ago
Hello, this functionality is not available now. You can try calling the actor and catching the error. But will pass this as feedback
!!!Joefree!!! 👑
Thanks. I wish there is an easy way to check actor availability without running the actor. For example I want to make 1 actor Paid version as a gateway for another "child" actors (act as UI), so user only need to pay for 1 actor to access other actor (all in one actors or all for one, one for all ... ?) 😃

Did you find this page helpful?