I am integrating out application with CC.
At first I was under the impression our users would have to make their own API key, we would store their key and consumer secret, get the access_token and away we go.
Then I read a post which we could host the API key, and have our multiple different clients integrate to our app without entering any parameters (Just the OAuth log in that's prompted).
Now here's the problem, our system is divided into multiple subdomains (example.whatever.com, example2.whatever.com), yet hosted on the same server. Is there a way for us to use the API key with multiple subdomains, considering the redirect URI? (Wildcard parameters?)
The simplest solution I can think of would be to make as many API Keys for your account as subdomains ( e.g. 5 subdomains, 5 API Keys, each with an appropriate redirect URI). One account can have an unlimited number of API Keys. Your users still wouldn't have to generate their own API keys--you would do that in advance, they would go through the OAuth2 process, and you would store their access tokens.
API Support Specialist
Thanks Shannon for your quick reply!
I don't think manually creating an API key for each customer is realistic in our scenario, so we will have a walkthrough for customers to create their own API key - which we will then store and use.
An alternate solution could be to use a single domain for the redirect, use a query parameter on that redirect URL to specify which subdomain the request initiated from and then on the single shared redirect URI, do a 302 redirect to the appropriate subdomain with the appropriate information. This would allow you to use a single API key, single redirect URI but still maintain the sub-domain architecture your set up for with your customers.