title: The Walmart Marketplace OAuth API keeps throwing SYSTEM_ERROR.GMP_GATEWAY_API error
body: <p>I’ve been trying to authenticate with the Walmart Marketplace API for both sandbox and production but have so far been unsuccessful. In all cases when I ping a request to the “Token API” (<a href="https://sandbox.walmartapis.com/v3/token" rel="nofollow noreferrer">https://sandbox.walmartapis.com/v3/token</a>) I get back the the following error code: “SYSTEM_ERROR.GMP_GATEWAY_API”. I’ve tried to authenticate with both JSON and XML but no luck.</p>
  
  <p>Here is my request with JSON:</p>
  
  <pre><code>{
    url: 'https://sandbox.walmartapis.com/v3/token',
    data: { grant_type: 'client_credentials' },
    options: {
      headers: {
        Authorization: 'Basic &lt;base64String&gt;=',
        Accept: 'application/json',
        'Content-Type': 'application/x-www-form-urlencoded',
        'WM_SVC.NAME': 'Walmart Marketplace',
        'WM_QOS.CORRELATION_ID': '1bca34cd-478f-4022-8c13-9b88293f56b2',
        'WM_SVC.VERSION': '1.0.0'
      }
    },
    method: 'post'
  }
  </code></pre>
  
  <p>Here is the error I'm getting with JSON:</p>
  
  <pre><code>error: [
      {
        code: 'SYSTEM_ERROR.GMP_GATEWAY_API',
        description: 'Illegal character in query at index 172: http://partner-read-srvc-app.prod2.partnerreadservice1.catdev.prod.walmart.com/partner-read-srvc-app/services/org/client/search?_s=cross_ref_key==ClientId;cross_ref_value=="8cdc9a4f-3518-4941-9b62-5bc88bac5f3c;buId==0;martId==0',
        info: 'System encountered some internal error.',
        severity: 'ERROR',
        category: 'DATA',
        causes: [],
        errorIdentifiers: {}
      }
  </code></pre>
  
  <p>The error mentions index 172 but I'm not exactly sure what it's referring to. Having looked at their docs <a href="https://developer.walmart.com/#/apicenter/marketPlace/latest#apiAuthentication" rel="nofollow noreferrer">here</a> I'm following the implementation to the letter.</p>
  
  <p>Here is my request for XML:</p>
  
  <pre><code>
  {
    url: 'https://sandbox.walmartapis.com/v3/token',
    data: '&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;\n' +
      '&lt;grant_type&gt;client_credentials&lt;/grant_type&gt;',
    options: {
      headers: {
        Authorization: 'Basic &lt;base64String&gt;=',
        Accept: 'application/xml',
        'Content-Type': 'application/xml',   
        'WM_SVC.NAME': 'Walmart Marketplace',
        'WM_QOS.CORRELATION_ID': 'be1ff777-9c7b-4ca2-8b9c-ac31696dbf79',
      }
    },
    method: 'post'
  }
  </code></pre>
  
  <p>But this is also fails. </p>
  
  <p>Does anyone know why these requests may be failing and perhaps provide a working example in JS of a request to authenticate with the API? </p>