LFIWebMaster Posted October 28, 2023 Posted October 28, 2023 I'm probably doing something dumb here so figured I'd ask the smart folks out there! My objective is use the REST API calls to dump group membership every month to automate some of our reporting. I'm trying to use Zapier to do this via their "webhooks" action. I've created a REST key for testing and granted it all access temporarily and am getting invalid API key errors on the Invision platform. I've tried to slip in a header with the API key using a bunch of headers I found on Google, from x-api-key, api-key, authorization, x-authorization and the equivalent using underscores to no avail. In the API logs, I show the following. The IPS are from Zapier's service and I've disabled any IP restrictions on the API key. The Zap step thats failing to auth is configured as follows as a GET request: I'm trying the most basic 0 parameter setup possible before I start making it a little more sophisticated. Has anyone gotten something like this to work in the past or know what I'm doing wrong?
Marc Posted October 30, 2023 Posted October 30, 2023 Try calling a proper endpoint rather than calling hello, and let us know what you are then seeing.
Solution LFIWebMaster Posted October 30, 2023 Author Solution Posted October 30, 2023 Marc, I got this figured out and hopefully this answer will help others. Its working with both the hello endpoint and members now. The fix was to NOT use a custom header with "api_key" or anything mentioned in my original post. The REST docs state using basic HTTP auth with the API key as the username. That still gave me an error in Zapier. What you need to do is have your HTTP auth field have the API key and a trailing pipe to format the request correctly, then it works. For example, my HTTP auth field is: "1234567890|" whereas with just the API key it was "1234567890". That trailing pipe made the magic happen!
Recommended Posts