• Robert Jakubov
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 3
    Replies
Hello friends,

i am trying to create a Salesforce Case using the REST api (sobject, etc) and one of my fields in the Case is a custom object (Social_Message__c)  which i configured as a Case custom field.  Now when I am doing a POST call to the /sobjects/Case/ SFDC endpoint, I get the following exception:
'[{"message":"Cannot deserialize instance of reference from START_OBJECT value { or request may be missing a required field at [line:1, column:490]","errorCode":"JSON_PARSER_ERROR"}]'.

The JSON payload that I am passing is:

{'AssetId': None, 'Social_Message__c': {'Private_Message__c': False, 'Processed__C': False, 'Social_Platform__c': u'Facebook', 'Body__c': 'test'}, 'Type': 'Customer Support', 'Status': 'New', 'Reason': None, 'Origin': 'Web', 'SuppliedName': None, 'SuppliedEmail': None, 'Language__c': 'English', 'ParentId': None, 'Subject': u'confirm pub fb msg', 'AccountId': None, 'ContactId': u'003c000000iQNDaAAO', 'SuppliedCompany': None, 'IsEscalated': False, 'Product__c': None, 'Country__c': 'United States', 'SuppliedPhone': None, 'Priority': 'Medium'}

Any ideas what might be the issue?

thanks 
Rob
Hi,
I am rying to configure an oauth2 callback URL for an existing Connected App
I tried clicking on the Edit link on the connected App, but I am not seeing any oauth2 configuration.
I also tried following this link:
https://developer.salesforce.com/page/Getting_Started_with_the_Force.com_REST_API#Web_Service_Authorization_with_OAuth

But it seems to be out-of-date too.
Can someone please help?

thanks
Rob
Hi
how can I  create a new Contact for an existing Account using the Rest API via curl or Python ?


thanks
Robert
Hi there,

I am getting the following error when call the REST API (modify Account information) from Python:
<type 'list'>: [{u'errorCode': u'JSON_PARSER_ERROR', u'message': u"Unexpected character ('B' (code 66)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [line:1, column:2]"}]

I have the following JSON data input:
 args={
              'BillingCity' : 'NY'
       }

and a header with the access Authorization token (not posted here).

Can anyone please help?

thanks
Rob
Hi there,

I am getting the following error when call the REST API (modify Account information) from Python:
<type 'list'>: [{u'errorCode': u'JSON_PARSER_ERROR', u'message': u"Unexpected character ('B' (code 66)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [line:1, column:2]"}]

I have the following JSON data input:
 args={
              'BillingCity' : 'NY'
       }

and a header with the access Authorization token (not posted here).

Can anyone please help?

thanks
Rob

The Chatter API Guide shows how to get authentication using grant_type = password.

 

I'd like to know how to set up the interactive flow.

The OAuth examples on Force.com look like they are not dealing with Chatter.  I tried posting:

 

client_id

client_secret

grant_type

redirect_uri

 

to 

https://na11.salesforce.com//services/oauth2/token

 

but I get an HTTP err 400 back.

 

The examples I see are posting to a whole different url: login.salesforce.com...

such as this example http://wiki.developerforce.com/index.php/Digging_Deeper_into_OAuth_2.0_on_Force.com

 

It looks a little suspicious.  In my mind changing from grant_type: password to something else should still post to the same URL.

 

What si the proper way to get an access token to Chatter REST API?