At least from the East German side this was only the case for a short period during the 50s (the idea that there was only "one Germany" - which from the point of view of the GDR and Moscow should of course be a "socialist Germany").
In the 60's and early 70's the GDR dropped this idea and worked towards being recognized as its own souvereign state, and insisted that there are two German states (the GDR and the FRG).
This eventually resulted in the "Basic Treaty" from 1972, and the GDR joining the UNO in 1973 (see: https://en.wikipedia.org/wiki/Basic_Treaty,_1972, or the much more detailed entry in the German Wikipedia: https://de.wikipedia.org/wiki/Grundlagenvertrag)