Credentials
Partners should provide Tokopedia with secrets for token generation and SSL keys that will be used for encryption and signing processes.
You can register your credentials (client_id, client_secret, and SSL keys) information through the Authentication Management menu.
Secrets
- Partner will provide required credentials in the form of client_id and client_secret that will be used for token generation.
- Tokopedia will do token requests via Get Token API, using given credentials.
- Partners will need to use different credentials for development and production environments.
- Credentials need to be rotated periodically between 6-12 months period.
- client_id and client_secret should not exceed 255 characters.
SSL Key
Partner needs to generate its SSLKey using OpenSSL.org, it will generate private and public keys that will be used for signing and encryption processes.
Step by step
Generate 2048 bit RSA Key on .pem format
openssl genrsa -des3 -out rsa-key.pem 2048Export the RSA Private Key on .pem format
openssl rsa -in rsa-key.pem -out private.pem -outform PEMExport the RSA Public Key on .pem format
openssl rsa -in rsa-key.pem -outform PEM -pubout -out public.pemKeep your private key.
Swap your public key with Tokopedia’s public key.
Your Private key will be used for Signing (see 8. Signature) and Decryption (see 9.2. Decrypt).
Tokopedia’s Public key will be used for Verify Signature (see 8. Signature) and Encryption (see 9.1. Encrypt).