Skip to main content
Question

Unauthorized (401) Error in Webhooks by Zapier When Fetching Pictory API Job Status

  • February 7, 2025
  • 1 reply
  • 4 views

Hello Zapier Community,

I'm trying to automate a workflow that generates a video in Pictory AI using Webhooks by Zapier.

  • Step 1 (Works):
    I successfully authenticate via POST https://api.pictory.ai/pictoryapis/v1/oauth2/token using client_id and client_secret, which returns a valid access token.
  • Step 2 (Works):
    I send a POST request to https://api.pictory.ai/pictoryapis/v1/video/storyboard with the access token, and it successfully starts a job, returning a job_id.
  • Step 3 (Fails - 401 Unauthorized):
    I try to retrieve the job status using a GET request to:
     

    bash

    CopyEdit

    https://api.pictory.ai/pictoryapis/v1/jobs/{job_id}

    but get a 401 Unauthorized error.

Headers I’m Sending in the GET Request:

 

json

CopiazăEditează

{ "Authorization": "Bearer {{access_token}}", "X-Pictory-User-Id": "2...", "accept": "application/json" }

I double-checked the access_token, and it’s fresh (expires in 4 hours), but it still returns 401 Unauthorized.

Things I've Tried:

  • Regenerating the token and retrying immediately.
  • Hardcoding the token instead of using dynamic values.
  • Making the same GET request in Postman (same issue).
  • Checking if the API has specific scopes/permissions that I might be missing.

Has anyone successfully implemented Pictory AI API with Zapier Webhooks?
Any insights on why the authentication is failing for GET /jobs/{job_id} but working for POST /video/storyboard?

Thanks in advance for your help!

Did this topic help you find an answer to your question?

1 reply

  • Author
  • New
  • 1 reply
  • February 7, 2025

Has anyone successfully retrieved job status from Pictory API using Zapier Webhooks?