Results are reported of a search for supersymmetry in final states with photons and missing transverse momentum in proton-proton collisions at the LHC. The data sample corresponds to an integrated luminosity of 35.9 fb−1 collected at a center-of-mass energy of 13 TeV using the CMS detector. The results are interpreted in the context of models of gauge-mediated supersymmetry breaking. Production cross section limits are set on gluino and squark pair production in this framework. Gluino masses below 1.86 TeV and squark masses below 1.59 TeV are excluded at 95% confidence level.[Figure not available: see fulltext.].