Dear Helper
I am very new to using APIs and REST, and I only have experienced IDs and Keys using RANDOM.ORG’s API.
That said, Transport for London Unified API’s front page says: ‘to use the Unified API, developers should register for an Application ID and Key. Append the app_id
and app_key
query parameters to your requests’. I have registered and I have chosen a product: ‘500 Requests per min’ but if I look at my profile for my ID and Key, there is nothing.
What am I doing wrong? Could someone please set down the steps that I should follow to generate an app_id and an app_key.
Many thanks.
Andrew
Hello and welcome to the forum!
Below are instructions on how to obtain a subscription key (you no longer require a separate app ID):
- Sign in to the API portal (or create an account if you don’t have one yet).
- Go to the Products page.
- Select the “500 Requests per min” product.
- In the text field labelled “Your new product subscription name”, enter a name for your subscription (I suggest using the name of your application).
- Press the “Subscribe” button next to the text field.
- Go to your Profile. You should see the subscription you have just created.
- In the subscription details, you should see a line that says “Primary key” and " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX". Press the “Show” button next to this.
- Your subscription key will now be revealed (replacing the “XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX”). Copy this subscription key.
You can now make requests to the Unified API by adding to your HTTP request a header that looks like:
app_key: 0123456789abcdef0123456789abcdef
(Use your own subscription key instead.)
Alternatively, in the request URL, add to your query string:
app_key=0123456789abcdef0123456789abcdef
(Again, replace with your own key.)
Your requests will be associated with your subscription and you’ll benefit from a more generous rate limit.
I hope this helps. Please let me know if you have any questions.
Thank you very much for being so quick and helpful. The instructions you provide seem complete. Now that I have asked this question, others should, hopefully, pick it up. I would suggest adding this to the FAQs because I don’t think this problem is listed, but I might be wrong.
Did you know that TfL was the first organisation in the world to try out, and deploy, contactless payments. Makes ya think, dunnit?