8

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?

  • 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
7

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>
-->
  • 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
4

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

  • 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

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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