# Real time trip update in alteryx

**URL:** <https://opendataforum.transport.nsw.gov.au/t/real-time-trip-update-in-alteryx/1975>\
**Category:** How to\
**Created:** [April 19, 2020, 2:34am UTC](https://opendataforum.transport.nsw.gov.au/t/real-time-trip-update-in-alteryx/1975 "2020-04-19T02:34:07Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![newboots](https://avatars.discourse-cdn.com/v4/letter/n/b5ac83/32.png) [@newboots](https://opendataforum.transport.nsw.gov.au/u/newboots)\
**Post date:** [April 19, 2020, 2:34am UTC](https://opendataforum.transport.nsw.gov.au/t/real-time-trip-update-in-alteryx/1975/1 "2020-04-19T02:34:08Z")

</div>

Hi guys  
I want to do a predictive analysis in alteryx using Public Transport - Realtime Trip Updates API. I use request URL and api key but keep getting 401 error. Calling application not authorized. Any help is welcome

---

<div class="post-metadata">

**Author:** ![jayen](https://sea1.discourse-cdn.com/flex019/user_avatar/opendataforum.transport.nsw.gov.au/jayen/32/208_2.png) [@jayen](https://opendataforum.transport.nsw.gov.au/u/jayen)\
**Post date:** [April 19, 2020, 10:33am UTC](https://opendataforum.transport.nsw.gov.au/t/real-time-trip-update-in-alteryx/1975/2 "2020-04-19T10:33:15Z")

</div>

I think in the Open Data hub you need to add the API to your application. If you’ve already done that, then some more details would be needed to help you.

---

<div class="post-metadata">

**Author:** ![newboots](https://avatars.discourse-cdn.com/v4/letter/n/b5ac83/32.png) [@newboots](https://opendataforum.transport.nsw.gov.au/u/newboots)\
**Post date:** [April 20, 2020, 6:04am UTC](https://opendataforum.transport.nsw.gov.au/t/real-time-trip-update-in-alteryx/1975/3 "2020-04-20T06:04:24Z")

</div>

I have done that. What details do you need? I tried putting in the request url and api key. But the error is 401 calling app not authenticated.

---

<div class="post-metadata">

**Author:** ![jayen](https://sea1.discourse-cdn.com/flex019/user_avatar/opendataforum.transport.nsw.gov.au/jayen/32/208_2.png) [@jayen](https://opendataforum.transport.nsw.gov.au/u/jayen)\
**Post date:** [April 20, 2020, 6:23am UTC](https://opendataforum.transport.nsw.gov.au/t/real-time-trip-update-in-alteryx/1975/4 "2020-04-20T06:23:53Z")

</div>

wait. is it not **authorized** , or not **authenticated**? those are two very different things. not authorized means your application authenticated, but isn’t allowed to access the api. not authenticated means the api key wasn’t applied properly or is invalid.

how you put the api key into alteryx would be the important bit of detail, since you’ve already added the API to your application.

---

<div class="post-metadata">

**Author:** ![newboots](https://avatars.discourse-cdn.com/v4/letter/n/b5ac83/32.png) [@newboots](https://opendataforum.transport.nsw.gov.au/u/newboots)\
**Post date:** [April 20, 2020, 7:49am UTC](https://opendataforum.transport.nsw.gov.au/t/real-time-trip-update-in-alteryx/1975/5 "2020-04-20T07:49:29Z")

</div>

The error is HTTP/1.1 401 Unauthorized  
I put the api key by copying it from the curl command so it is  
apikey iT9QxxxxxxxxxxxxxxxxxxxxxxxObkBMOxn

---

<div class="post-metadata">

**Author:** ![newboots](https://avatars.discourse-cdn.com/v4/letter/n/b5ac83/32.png) [@newboots](https://opendataforum.transport.nsw.gov.au/u/newboots)\
**Post date:** [April 20, 2020, 7:50am UTC](https://opendataforum.transport.nsw.gov.au/t/real-time-trip-update-in-alteryx/1975/6 "2020-04-20T07:50:59Z")

</div>

So I guess that means the application authenticated. How do I allow it to access the api.

---

<div class="post-metadata">

**Author:** ![jayen](https://sea1.discourse-cdn.com/flex019/user_avatar/opendataforum.transport.nsw.gov.au/jayen/32/208_2.png) [@jayen](https://opendataforum.transport.nsw.gov.au/u/jayen)\
**Post date:** [April 20, 2020, 8:29am UTC](https://opendataforum.transport.nsw.gov.au/t/real-time-trip-update-in-alteryx/1975/7 "2020-04-20T08:29:44Z")

</div>

If it’s working with curl, then it must be something specific to how alteryx is setting the header. Is there any documentation from alteryx?

---

<div class="post-metadata">

**Author:** ![newboots](https://avatars.discourse-cdn.com/v4/letter/n/b5ac83/32.png) [@newboots](https://opendataforum.transport.nsw.gov.au/u/newboots)\
**Post date:** [April 20, 2020, 8:34am UTC](https://opendataforum.transport.nsw.gov.au/t/real-time-trip-update-in-alteryx/1975/8 "2020-04-20T08:34:03Z")

</div>

> **[APIs in Alteryx: cURL and Download Tool](https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/APIs-in-Alteryx-cURL-and-Download-Tool/ta-p/31522)**
>
> API connections give access to many web-based applications, database systems, or programs by exposing objects or actions to a developer in an abstracted format that can easily be integrated into another program. In other words, an API functions as a...

here is the document I am trying to follow.

---

<div class="post-metadata">

**Author:** ![jayen](https://sea1.discourse-cdn.com/flex019/user_avatar/opendataforum.transport.nsw.gov.au/jayen/32/208_2.png) [@jayen](https://opendataforum.transport.nsw.gov.au/u/jayen)\
**Post date:** [April 20, 2020, 9:00am UTC](https://opendataforum.transport.nsw.gov.au/t/real-time-trip-update-in-alteryx/1975/9 "2020-04-20T09:00:55Z")

</div>

i looked at that link and found a link to [Guide to Creating Your Own Connector - Authentication](https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Guide-to-Creating-Your-Own-Connector-Authentication/ta-p/23582) which looks better.

The second image looks like it should work, so if you have spelled everything correctly, it really should work.  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/nsw/original/1X/5aa69d0bb774ad30b5cb6133d556db4bb7e512c5.png)

Is there any way in Alteryx to see all the headers (request and response)? There may be other headers in the request that are causing issues?

---

<div class="post-metadata">

**Author:** ![newboots](https://avatars.discourse-cdn.com/v4/letter/n/b5ac83/32.png) [@newboots](https://opendataforum.transport.nsw.gov.au/u/newboots)\
**Post date:** [April 20, 2020, 9:05am UTC](https://opendataforum.transport.nsw.gov.au/t/real-time-trip-update-in-alteryx/1975/10 "2020-04-20T09:05:56Z")

</div>

I had used apikey for name. I tried it with Authorization and it works now. Thankyou very much.
