Windows-Based Systems

Our APIs are deployed in isolated Sandbox and Production environments. Charter Supplier onboarding onto these environments requires authentication with the Walmart API Proxy/Gateway before initiating an API call. The first step to authenticating your access is generating your access keys.

Before you begin:

🚧

Please make sure your business partners have already connected with a Walmart Data Ventures Account Manager.

Before you begin generating your API access key, you need to have access to a command line terminal. For Windows systems, ensure that either Git Bash or OpenSSL for Windows has been installed. PuttyGen tool is not recommended as the default format is not PKCS8.

Generating API Keys - Windows-based Systems

Complete the following steps to generate your key.

  1. Create a desktop folder, titled "RSA Keys" (optional)

  2. Right-click the folder and select "Show more options" to open the Git Bash or OpenSSL terminal (optional)

  3. From the terminal command line, you will generate an RSA key-pair:

    • Paste the following command into the terminal and hit enter.

      $ winpty openssl genrsa -des3 -out my_rsa_key_pair 2048 
    • Using -des3 ensures that the pem file generated in the above step will be passphrase protected. You will be prompted for the passphrase. The passphrase will be located directly above the prompt in the terminal. In the example below, 65537 is the passphrase:
      Example:

      e is 65537 (0x010001)
      Enter pass phrase for my_rsa_key_pair:
      

      Note: Please note this passphrase in a safe location. You will use it again.

    • Type the passphrase into the terminal where prompted (note that while entering the passphrase, it will not look like you are actually typing) and hit enter.

    • You may be prompted to enter the passphrase twice.

  4. Next, you will export the private key in the private_key.pem file:

    • Paste the following command into the terminal and hit enter.

      $ winpty openssl pkcs8 -topk8 -inform PEM -in my_rsa_key_pair -outform PEM -out private_key.pem -nocrypt
      
    • Type the same passphrase into the terminal where prompted (note that while entering the passphrase, it will not look like you are actually typing) and hit enter.

    Note: Keep your private key safe. You will not share your private key.

  5. Finally, you will export the public key in the public_key.pem file:

    • Paste the following command into the terminal and hit enter.

      $ winpty openssl rsa -in my_rsa_key_pair -outform PEM -pubout -out public_key.pem 
    • Type the same passphrase into the terminal where prompted (note that while entering the passphrase, it will not look like you are actually typing) and hit enter.

What Happens Next

You should now have your public_key.pem file.

If you are requesting access to multiple environments, remember to repeat the above steps for each environment you are requesting.

Once you have your key(s), you will be able to move on to Step 2.





©️Walmart | All Rights Reserved