It's all about the answers!

Ask a question

RTC OAuth consumer error


Arvind Rangarajan (16133) | asked Mar 30 '12, 4:25 a.m.
I am trying to retrieve the OSLC catalog from the RTC url :
https://rtc:9444/ccm/oslc/workitems/catalog using OAuth. I generated a consumer (Inbound) key with a secret.

I supplied this key and invoked the getRequestToken on the OAuthClient but I got back a 'invalid_consumer_key' message.

I skipped this step an invoked the access method, I got back a 'parameter absent' message. I sent the consumer key,secret,realm,oauth parameters as per the OAuth specification.

Can someone please guide me on the correct way to retrieve the catalog ?

4 answers



permanent link
Ralph Schoon (63.3k33646) | answered Mar 30 '12, 4:41 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Have you looked at https://jazz.net/library/article/635 ?
You might also want to provide more context on what you are trying to do and how.

permanent link
Arvind Rangarajan (16133) | answered Mar 30 '12, 6:00 a.m.
Have you looked at https://jazz.net/library/article/635 ?
You might also want to provide more context on what you are trying to do and how.


Thanks Ralph. I will look into the article.

I need to write a client application that lists the Project areas (and downwards like Defects etc) present on my RTC server. I intend to do this starting from the CCM Rootservices and extracting the CM providers. I have been able to retrieve the CCM rootservices document and from that the catalog URL. This is the snippet of the code I use.


OAuthServiceProvider serviceProvider = new OAuthServiceProvider(RURL, UURL, AURL);
OAuthConsumer consumer = new OAuthConsumer(null, "secret", "key", serviceProvider);

OAuthAccessor accessor = new OAuthAccessor(consumer);

//Setup the client that is set up with SSL.
OAuthClient client = new OAuthClient(new HttpClient3(new MyCustomSSLClient()));
//Attempt to get a request token from the provider
try {
try {
client.getRequestToken(accessor); -> throws exception 'invalid consumer key'
} catch (OAuthProblemException e) {

Collection<OAuth> parameters = new ArrayList<OAuth>();
OAuth.Parameter param = new OAuth.Parameter("oauth_consumer_key", consumer.consumerKey);
parameters.add(param);
param = new OAuth.Parameter("oauth_consumer_secret", consumer.consumerSecret);
parameters.add(param);
param = new OAuth.Parameter("realm", "Jazz%20Team%20Server");
parameters.add(param);
param = new OAuth.Parameter("oauth", "OAuth");
parameters.add(param);
OAuthMessage req = new OAuthMessage(OAuthMessage.GET, uri, parameters); -> uri is the catalog url
OAuthMessage request = client.access(req, ParameterStyle.BODY); -> throws exception 'parameter absent'

permanent link
Ralph Schoon (63.3k33646) | answered Mar 30 '12, 6:15 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
You might want to consider posting questions like that in the Extending Team Concert forum. That forum is also a good source to search for similar questions. The Advanced Search might be useful too. i would also search developerworks for articles.

I assume you would provide a user ID and a password. you would not need a registration as friend. If you register as friend I would assume you need to set a functional user ID. However, O have not had time to play much with OSLC.

permanent link
Arvind Rangarajan (16133) | answered Mar 30 '12, 6:31 a.m.
Thanks Ralph - I will look to post it on the other forum. The article link that you provided is also proving to be useful in this regard.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.