Q: Angular Chain HTTP is causing errors I am trying the following code in an angular.js application to migrate data from one database to another.  This is one part of the function in order to gain authorization credentials to send POSTs to the receiving database.  However, it doesn't work.  My first function, ATsintegrationsService.beginBackfill(clientIDs), returns the list of applicants fine.  The error begins at getAuthToken().  Even though it hits the URL with the correct data, I keep on getting an error in the service.  Can anyone shed some light on what is going on here, I'd really appreciate it.  I'm at a loss for what may be causing my issues.
Main function (triggered by hitting an apply button):
$scope.beginBackfill = function() {
    $scope.loading = true;
    AtsintegrationsService.beginBackfill($scope.clientids).then(function (response) {
       $scope.applicants = response.data;
       $scope.getAuthToken();
       $scope.createSuccess = true;
       $scope.loading = false;
     },
       function(error) {
          $scope.loading = false;
          $scope.createFailure = true;
          console.log("Failure to backfill data - " + error);
       });
   };

Here is $scope.getAuthToken():
$scope.getAuthToken = function() {
    AtsintegrationsService.getAuthToken().then(function (response) {
        $scope.authToken = response.data;
        console.log($scope.authToken);
    },
    function(error) {
        $scope.loading = false;
        $scope.createFailure = true;
        console.log("Failure to obtain auth token - " + error);
        console.log(error);
    });
};

And finally, the service code for getAuthToken() - some data has been removed and is indicated by {snip}.
srvc.getAuthToken = function () {
var url = {snip};

return $http({
    headers: {
        'Content-Type': 'application/x-www-form-urlencoded'
    },
    responseType: 'json',
    method: 'POST',
    url: url,
    data:
    {
        "grant_type": "{snip}",
        "client_id": {snip},
        "client_secret": "{snip}"
    }
})
  .success(function (data) {
    console.log("We have a proper return.");
    return data;
  })
  .error(function (data) {
    console.log("There was an error in the service.");
    return data;
  });
 };


A: We figured out the problem was with CORS headers; the code I have was fine.
