Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Providing a Set of API Keys for Developers to Test Out Different API Outcomes

DZone's Guide to

Providing a Set of API Keys for Developers to Test Out Different API Outcomes

See Kin Lane's thoughts on what you could do with test numbers and unique identifiers.

· Integration Zone
Free Resource

Share, secure, distribute, control, and monetize your APIs with the platform built with performance, time-to-value, and growth in mind. Free 90 day trial 3Scale by Red Hat

I wrote a post about Twilio using magic phone numbers that let their developers test out functionality without incurring any charges for deploying live phone numbers, making calls, and sending SMS. After publishing my post, Runscope CEO, John Sheehan (@johnsheehan) said he was behind the original spec for the Twilio magic numbers.

John continued to share some of the logic that went into his original spec:

Which I think adds another dimension to the concept of having test numbers like this. Different numbers give you different outcomes, and different credit card numbers give you different results. What else could you do with test numbers and unique identifiers? Existing invoice and order numbers for different commerce situations. Seems like you could load just about anything into any alpha and / or numeric that you would want to.

Around the turn of the century (I don't think I've ever said that) I used to work on web applications for non-profit organizations where I used to build campaign code tracking for large, and lengthy mail, phone, fax, and other types of activities. We had 6 to 8 digit identifiers, which every two digits had unique meanings--allowing us to build a pretty robust set of scenarios that helped us track every step in the campaigns evolution. 

Anyways, I think the concept is worthy of further exploration. I could see API providers crafting a pretty robust set of keys that could represent almost any object served up as part of API operations, with a very structured approach for how you tailor a multitude outcomes involving these objects. For me, this type of stuff goes way beyond just having a sandbox for your API, and could provide a much more meaningful way help developers polish their integrations.

Discover how you can achielve enterpriese agility with microservices and API management

Topics:
test ,spec ,api

Published at DZone with permission of Kin Lane, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}