That's a very different kind of case. This one refers to creating third-party presences on WhatsApp's messaging platform by talking to their servers remotely and mimicking the official client software in order to gain access. The Oracle case is a matter of Google implementing a Java standard library so that their Google's Java VM could run the same code that runs on Oracle's.
Aside from an overloaded meaning of the term "API", the two situations have very little in common.
Aside from an overloaded meaning of the term "API", the two situations have very little in common.