I've recently updated the moodle sgoauth server files to include api calls that we needed for an integration project we are currently doing.  For this integration we also needed authorization tokens to be granted automatically so I added support for specifying autoauthorize in the datamodel.

While testing, I encountered a bug on the elgg consumer code that prevented the cron jobs from deleting stale tokens so I fixed that as well.

Download the updated code.


Here is the link to the post announcing the first release.

posted in ,

Installation process

I am trying to test your plugin with Moodle 2.3.1 and Wordpress 3.4.1

1) Set up in Wordpress
there are 4 fields that need to be filled in, Consumer Key, Secret, OAuth Server Base URL and OAuth Server Name. Where do I get that information in moodle?

2) at the step 3 on how to install the server.

"... At this point the necessary database tables have been setup.

You'll need to create records for your consumers by manually
  inserting into the database.  Some sample sql insert commands are:

  For wordpress:

  mysql> insert into oauth_consumers (name, callbackurl, cancelurl, secret, consumerkey, timecreated, timemodified)
          values ('Wordpress', 'http://my.wordpress.url/wp-load.php?action=sg_oauth&service=logincallback',
                  'http://my.wordpress.url/wp-login.php', 'mysecretstring', 'mywordpressconsumerkey',
                  unix_timestamp(current_timestamp()), unix_timestamp(current_timestamp()));    ....."

It is not clear for me, Please can you explain it.

Thanks in advance


by Carlos Kiyan on 07/25/12

updated code


You might want to download the updated code from github instead -- https://github.com/solutiongrove/sg-moodle-oauth  There should be instructions in the readme file.

by Deds Castillo on 07/25/12

help for normal php

I am new to moodle and i am not good on word press and Elgg.Can you help me to implement the oauth with normal php.

by Azeem Sai on 01/20/14

must to use

There is definitely so many great options that go a long with this. You will not disappointed at with the use of it. You will be able to do so much with it. http://drunk17.tumblr.com

by james leroy on 05/12/14

windows 8 upgrade

Thank you updating the moodle sgoauth server files. Moreover, thank you for fixing the bugs in it. Solution grove is doing a great job in the field as a server client technology. Hope you will help like this forever. I have sent a link to the post. <a href="http://www.windows8-upgrade.com">windows 8 upgrade</a>

by vishnu narayanan on 07/11/14

Wonderful illustrated information.

Wonderful illustrated information. I thank you about that. No doubt it will be very useful for my future projects. Would like to see some other posts on the same subject!

by Lindur Ginta on 08/11/14


I think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article.

by adsgy kingcd on 08/20/14


I have read your article, it is very informative and helpful for me.I admire the valuable information you offer in your articles. Thanks for posting it. [Exuviance:>>>>> http://www.skin-beauty.com ]

by muneer ahmed on 09/23/14

top mac pc computer repair services jupiter

I showed this quality article to my friends and family members. They were also delighted to read this extremely good quality article. You've satisfied a lot of people and I will be on the lookout for your next article. <a href="http://www.ballardcomputer.com">top mac pc computer repair services jupiter</a>

by muneer ahmed on 09/29/14

Add comment