All resolved. Stupidity on my part.
I needed to go in to Google Apps as an administrator, select user accounts, select settings and put a tick in the box that said: " allow API external access to manage accounts".
If there is a prize for stupidity then I'd like to claim it and put the winnings to laser treatment to rectify my poor eyesight.
Appreciate all the help.