Internet of Things (IoT) composed of large number of sensing devices with a variety of features applicable for various applications. In such scenarios, due to low data handling capabilities, limited storage, and security aspects, it is quite challenging to protect networks against illegal information access and utilizes storage efficiently. Though researchers provide various solutions for security and data storage, but a few solutions are appropriate for wireless sensor networks (WSNs)-enabled IoTs. Therefore, a blockchain-based decentralized framework integrated with authentication and privacy-preserving schemes is developed for the secure communication in WSNs-enabled IoTs. Registration, certification, and revocation process are employed for the communication with sensor nodes and base station (BS) in a cloud computing environment. In this scheme cluster heads forward the collected information to the BS. Consequently, BS records all the key parameters on the distributed blockchain and large data is forwarded to clouds for the storage. The revoked certificates of all malicious nodes are eliminated from blockchain by BS. The performance of the proposed scheme is scrutinized in terms of detection accuracy, certification delay, computational, and communicational overheads. The simulated results, comparative analysis, and security validation support the superiority of the proposed solution over the existing approaches.