Create and manage API Scripts

How to create a new Script

  1. Go to the Admin Menu and select Scripts
  2. Create a new script using the “+ Script” button.
    script_page.png
  3. Grab the value from the Application Key* - you'll need this to initiate a connection to Shotgun.
  4. Now you can use your script key to connect to Shotgun.  Check out how to connect to Shotgun with your script here.
*Pro tip: If for some reason you need to reset the Application Key of your Script, you'll need to create a new Shotgun Script entity to do so.  First rename your existing Script to something like "[My Script] - OLD", then delete it.  Then create a new script.  The reason you need to rename the old one is that Shotgun requires unique names for each Script.

When to set up a new script?  

Script actions can be logged. The more fine-grained the use of individual script keys, the easier it will be for you to track which script is making changes for debugging.  Having separate scripts is also a good way to track which scripts will be impacted by changes on your Shotgun site and who the script maintainer is.

Follow

2 Comments

  • 0
    Avatar
    Ashley Canning

    This does not tell me how to upload scripts to shotgun. Only to create an API key.

  • 0
    Avatar
    Simon Clarke

    Deleted my previous comment after talking to someone with a better comprehension of Shotgun.

    If I understand correctly, this has nothing to do with creating a new script - one is creating a script key for accessing/interfacing with Shotgun, for reasons of security and tracking what is doing what? You can use this key in any number of pieces of code or not at all.

    Not convinced this page makes that clear.

    |Simon

     

    Edited by Simon Clarke
Please sign in to leave a comment.