Create record in salesforce from java application - rest

I need opportunity to create record in salesforce from my java application. I found out the way to receive security token, but when I try to create a record, I receive such error message in response:
[{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}]
It seems that I have problems with authorization, could anyone provide just a simple sample, which works. I have already tried several sets of headers, but I was not success.

Related

REST API with basic auth method doesn't work when trying to use inherit

Ive got a rest api that connects with a MQ queue. Im using the IBM tools such as App connect enterprise, and MQ Explorer of IBM.
The thing its that when I send rest, using basic mode, the request results in 200 (ok). Ive assigned the values of users and passwords. But when I try to use inherit auth from parent, the answer it's unauthorized 401.
I tryed to modify the swagger doc, but it resulted very complex, and also It occurred to me that maybe if I develop an LTPA token, that could be a help.
Do you know a method to make inherit auth to work without asking the user and password again? Thank you

Can't connect to Salesforce With Google Data Fusion

Trying to configure the salesforce connector to read data from salesforce using Google Data Fusion, but can't connect to Salesforce.
I keep getting "Connection to salesforce with plugin configurations failed" error message when hitting the "get schema" button on the connector. My guess is that this related to my salesforce connected app, but can't really tell. Is it related to the callback URL setting in the connected app? Did anyone succeed connecting to Salesforce using Data fusion?
It looks like the error is coming from https://github.com/data-integrations/salesforce/blob/abc563938e837b3bcfc42dbd4b26c0c6ef347451/src/main/java/io/cdap/plugin/salesforce/authenticator/Authenticator.java#L57.
Unfortunately it looks like the error message doesn't include anything from the root cause, but most likely it's failing during the oauth login, which makes a POST request to:
[login url]?grant_type=password&client_id=[client id]&client_secret=[client secret]&username=[username]&password=[password]
You could try making that request manually and see if you get an error back.
I was getting the same error, but I managed to solve it.
First things first, even though the Security Token is optional, I did not manage to make it work without it.
Apparently, depending on how your Salesforce instance is configured, if your password is mypassword, and your security token is XXXXXXXXXX, then the plugin uses mypasswordXXXXXXXXXX during the authentication.
Secondly, and most important, for the login URL field, this field is the oauth2 url. Therefore where before I was putting https://test.salesforce.com, I had to put https://test.salesforce.com/services/oauth2/token. With this final step, it worked. Below a screenshot of the field.

Receiving ACCOUNT_LACKS_PERMISSION_TO_CORRECT_TABS from Rest API; where is this permission configured?

I have an application that's been running just fine for a couple of years. Recently I'm getting the error message ACCOUNT_LACKS_PERMISSION_TO_CORRECT_TABS when attempting to add tabs to a newly added signer using a POST .../recipients/[recip-id]/tabs request to the REST API. I'd guess this permission is configured in the DocuSign console, but I'm not finding it there. Anyone know what controls this?

Example of a SOAP payload for IDEONE

Has anyone got a sample SOAP payload for the ideone.com service?
I've tried several clients including the Firefox SOA client ( which returns an error from the service), the 360Works java soap client which crashes on reading the wsdl, and the online soapclient.com which returns nothing.
I tried two of the SOAP clients you mentioned, soapclient.com and Firefox SOA, and successfully accessed the service at ideone.com.
First, make sure you are using the API password when trying the service and not the site password.
With soapclient.com, make sure that you're viewing the results as XML. You won't see anything if you choose HTML (one of their options).
With both clients, make sure you don't interpret the status with a key name of "error" as meaning that an error has been returned, if the value of this field is "OK". This indicates success.

Error code 100 (Can only call this method on valid test users for your app)

getting the error {"error":{"message":"(#100) Can only call this method on valid test users for your app","type":"OAuthException"}} whenever trying to write to any facebook end point. Reading (GET) works fine, writing (POST) fails. Does anybody know how to resolve this?
I have also opened a ticket on FB dev site:
http://developers.facebook.com/bugs/184198634991192?browse=search_4e93328871c8a3231774584
The problem does not occur is I would shoot the POST request from my browser as if I am the user.
The problem does occurs only when sending from our servers on behalf of the user from one of our dev machines which have other subdomain names instead of www (such as dev1.blablabla.com & dev2.blablabla.com, while the app is registered to www.blablabla.com).
So the question is, does facebook attempt to do a reverse DNS lookup on all write requests to verify the source?
I believe your requirement is to get the user details of the owner of Facebook access token (normally the currently logged in user)
For that you have to issue a GET request and not a POST request.
The reason why it works when fired from the browser is that when you submit a query through the address bar it is send as a GET request, and when sent from your server it is send as POST and fails producing the error message mentioned in your post.
Facebook doesn't do a reverse DNS lookup on your write request and not need to configure anything in your server related to it.
Hope the answer is clear enough for you.