Wireless Sensor Network (WSN)is widely explored for traffic flow prediction. Traffic forecasting is a spatio-temporal problem because of the dynamic nature of road traffic. The data collected from users for traffic prediction is often private in nature. These characteristics make it necessary to develop a framework for accurately predicting traffic flow while maintaining user data privacy. This paper proposes a Federated Learning-based spatio-temporal approach termed Fed-STGRU for traffic prediction without transmitting raw user data over the network. Federated Learning is a distributed machine learning approach incorporating techniques like Stochastic Gradient Descent for data privacy preservation. The proposed scheme preserves privacy while attaining comparable accuracy and loss as baseline algorithms, FedAvg and TGCN.