Inactive Developer

I’m having a weird issue with the XML-RPC API.

I’m an active developer. I generate a token. It works on the REST API.

I try a call with the XML-RPC API using the same token. It responds with ‘Inactive Developer’

This doesn’t relate to the token - if the token expires, it responds with ‘Not Authorized’. Then, when I refresh the token, it goes back to Inactive Developer.

But, I just used my developer ID to refresh the token, and literally a couple of lines earlier in the code to successfully call the REST API, so I think that Inactive Developer must be an incorrectly returned error?

This is the code I’m using (using the node xmlrpc library)

setTimeout(function () {
    const client = xmlrpc.createSecureClient('https://api.infusionsoft.com/crm/xmlrpc/v1?access_token=' + token)

    client.methodCall(
      'ContactService.linkContacts',
      [[token.toString(), coreId, userId, relationshiptype]],
      function (error, value) {
        if (error) {
          console.log(error)
          console.log('req headers:', error.req && error.req._header)
          console.log('res code:', error.res && error.res.statusCode)
          console.log('res body:', error.body)
        } else {
          console.log('value:', value)
        }
      })
  }, 1000)

And this is what I’m getting back

    Error: Invalid XML-RPC message: Developer Inactive
    at Deserializer.onDone (/Users/justinhandley/IdeaProjects/lcf/node_modules/xmlrpc/lib/deserializer.js:79:21)
    at SAXStream.emit (events.js:159:13)
    at SAXParser.SAXStream._parser.onend (/Users/justinhandley/IdeaProjects/lcf/node_modules/sax/lib/sax.js:190:10)
    at emit (/Users/justinhandley/IdeaProjects/lcf/node_modules/sax/lib/sax.js:624:35)
    at end (/Users/justinhandley/IdeaProjects/lcf/node_modules/sax/lib/sax.js:667:5)
    at SAXParser.end (/Users/justinhandley/IdeaProjects/lcf/node_modules/sax/lib/sax.js:154:24)
    at SAXStream.end (/Users/justinhandley/IdeaProjects/lcf/node_modules/sax/lib/sax.js:248:18)
    at IncomingMessage.onend (_stream_readable.js:598:10)
    at Object.onceWrapper (events.js:254:19)
    at IncomingMessage.emit (events.js:164:20)
req headers: POST /crm/xmlrpc/v1 HTTP/1.1
User-Agent: NodeJS XML-RPC Client
Content-Type: text/xml
Accept: text/xml
Accept-Charset: UTF8
Connection: Keep-Alive
Content-Length: 318
Host: api.infusionsoft.com


res code: 401
res body: <h1>Developer Inactive</h1>

Any help is much appreciated.

Verify that you’re using the same client id/secret tokens for both REST and XML-RPC. I’ve had this happen where I had on set on one and then the other failed because the access/refresh tokens are specific to the developer id/secret

Hi John - I’m actually using the exact same info for both - I am using the REST API right before this to make a call, and it is working and returning IDs for contacts I created. I need the xml-rpc to link the contacts, and I’m just passing it the exact same token. I don’t see the XML-RPC asking for anything other than the token and then the API Key (passed in as the first variable) - is that right?

so when you’re using the xml-rpc you need to assign the values in the object, not just pass the access token.

Can you clarify what you mean by that?

Something along these lines:

image

@JustinHandley see my response in your other post. Why does the XML-RPC API not always pass back XML?