This can be generated using the helper method in the GoCoin Php library, as opposed to on the front end. 

GoCoin::requestAuthorizationCode($client_id, $client_secret, $scope, $redirect_uri=NULL)