• Sumit Arora 9
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
Hi,
I'm doing an integration with a third party and I have to send the accid to the third party to get some information back. I got the result when I type the accid, but I what I really need to do is set up a params as variable not a literal.

Here is what I want to do:
This doesn't work.
Just for testing I'm setting up manually the accid but this value is going to be the accid on the opportunity. The values is going to different base on the opportunity.

string accid = "CtjSFlLYIls4-gAe";
string s = '{"jsonrpc": "2.0","id": 1,"method": "acct.phone.get","params": [accid]}';

I got an error: {"jsonrpc":"2.0","error":{"message":"invalid JSON in request body","code":-32700}}

It looks like I'm not using the right JSON format to set a parameter. 

But when I type the id on the params I got the information back.
string s = '{"jsonrpc": "2.0","id": 1,"method": "acct.phone.get","params": ["CtjSFlLYIls4-gAe"]}'; 

I hope someone can help me.
Thanks.