Trying to curl into Tines with Tines API I set up, but

For the life of me, I’m doing something wrong, but not figuring it out lol

  • Created API, Tines, added a value, picked the options that seems like that API should be able to get to everything
  • Whether I curl / bruno, etc. I get 401 error

I know it’s not that hard, but… Apparently I need a different step-by-step than the ones I’m finding. Anyone feeling generous with a link or some basic help lol. Thx!

Depending on what API you are trying to use, it sounds like you might not be including the correct credentials. A 401 error means that its not recognizing you. Tines needs two headers on every request. It should look something like this:

curl -H "x-user-email: you@yourcompany.com" \
     -H "x-user-token: YOUR_API_TOKEN" \
     "https://yourtenant.tines.com/api/v1/agents"

Did you include that information in your headers?

Hey @macgyver ! Along with checking the headers Spencer mentioned, it might be worth trying a different path to create the API key.

I worked on a recent ticket where the customer was also getting 401 errors with keys created through Credentials → Tines. In their case, creating the key directly under Settings → API keys and using that new key in the request resolved it.

Not sure if you’re hitting the same issue, but give that a try and let us know if you’re still getting the 401.

If you need anything else or have any more questions, feel free to hit me up!

Leah,

You win today! :wink:

Late last night, I wound up stumbling on that distinction in Claude - and once I used the actual “outside in” api key (vs the credentials for “inside tines”), everything worked as expected.

Much appreciated!

Thank you for the pointer! I actually hadn’t (but was using wrong auth/api setup), but for my use case I was using the Authorization: Bearer approach.

Once I used the right api key creation process, all good!

I can re-look at the doc pages, but to Leah’s note, I suspect adding a qualifier about this to docs would be helpful.

Doing the credential setup, searching for Tines, etc, didn’t seem incorrect while doing it (but def not correct lol)

WOW! That’s crazy! :face_with_crossed_out_eyes: What a small world. So glad it helped!