Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

After following the install guide and unzipping the webservice.zip, copying the JDBC driver and config XMLs, when I try and access in a browser I see:

{"error":"invalid_grant"}

A bit of digging suggests this is something to do with OAuth. Any ideas?

share|improve this question
1  
check your cd_ambient_conf.xml file and try commenting out Security section. –  Ram G Jan 23 '13 at 15:39
    
Thanks Ram - that was it! Feel free to re-enter as an answer and Ill accept it! –  Neil Jan 23 '13 at 16:07

2 Answers 2

up vote 7 down vote accepted

By default the OAuth security is enabled for the web services requests. You need to disable the security in cd_ambient_conf.xml file by commenting out the Security xml node section.

<!--
    <Security>
<RequestValidator>com.tridion.webservices.security.validator.OAuth2RequestValidator</RequestValidator>
    <SharedSecret>sample_passphrase</SharedSecret>
    </Security>
-->
share|improve this answer
1  
Alternatively, you could leave the security in place and actually pass a token in your requests. That seems wiser to me. –  Peter Kjaer Jan 24 '13 at 9:00
    
Thanks Peter - right now we just wanted to get it working. I can see from the docs a whole section about implementing authentication for the Content Delivery Web service or a Web site where this setting and the Accounts ones are utilised. –  Neil Jan 24 '13 at 9:08

That suggests that the request was made with an invalid token (or perhaps no token at all?).

share|improve this answer
    
Indeed - but why would this be occurring in a fresh install? I notice there's an "Account" node in the webservice conf - does this have to be set to an existing Tridion user? –  Neil Jan 23 '13 at 15:46
    
Well did you pass a token in the URL? If not, you know the answer :) If you did, it was apparently no longer valid. –  Peter Kjaer Jan 24 '13 at 8:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.