We propose and experimentally demonstrate a reconfigurable two-dimensional (temporal-spectral) time domain spectral phase encoding (SPE) scheme for coherent optical code-division-multiple-access (OCDMA) application. The time-domain SPE scheme is robust to wavelength drift of the light source and is very flexible and compatible with the fiber optical system. In the proposed scheme, the ultra-short optical pulse is stretched by dispersive device and the SPE is done in time domain using high speed phase modulator. A Fiber Bragg Gratings array is used for generating the two-dimensional wavelength hopping pattern while the high speed phase modulator is used for generating the spectral phase pattern. The proposed scheme can enable simultaneous generation of the time domain spectral phase encoding and DPSK data modulation using only a single phase modulator. In the experiment, the two-dimensional SPE codes have been generated and modulated with 2.5-Gb/s DPSK data using a single phase modulator. Transmission of the 2.5-Gb/s DPSK data over 49km fiber with BER<10-9 has been demonstrated successfully. The proposed scheme exhibits the potential to simplify the architecture and improve the security of the OCDMA system.© (2010) COPYRIGHT SPIE--The International Society for Optical Engineering. Downloading of the abstract is permitted for personal use only.