-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need better documentation for customizing API requests #7
Comments
Think you could open a pull request? |
I would also recommend throwing the plugin into a repo online so I can help you out with it and link people to it! |
I can't release the plugin as it is for a client, and I don't have the authority to release it as of yet. I will checkout the HttpSocketOauth and do a pull request. Take care, Paul |
This apparently worked for the authorization, but now it sends it on other calls as well. I'm having a hell of a time trying to get this to work with Salesforce. It appears as though their flow is considerably different. The rest url is generated dynamically and returned with the access token. The REST calls do not need the client_id or secret. They only need the Authorization header set. The format is simply "Oauth access_key" |
You are expected to extend the ApisSource and define your own class. If you do, you can override the methods (and call the parent method from within) or you could simply define a beforeRequest() method to make any last-minute modifications. Again, if you had some code online to review (just the datasource only) this would be a lot easier. Are you creating a separate plugin/datasource/config file that extends this one? Or are you just modifying this directly and/or modifying the request object directly? |
I think I got it worked out. I definitely had to override some methods. I'll try to push the basic plugin when I wrap up the project. |
Are you leveraging an API config map or are you just putting in the paths directly? |
I did both. I used the path directly until I figured it out. Now I am using a config may. I was not getting the results I wanted from some of the calls, so I ended up using SOQL and currently have that working in a rudimentary fashion. I am going to pull some of the query builder methods to build and pass SOQL queries. |
This does not appear to be an issue with the plugin itself. There are a number of ways to customize API requests. I am leaving this issue open and changing the title to reflect a need for better documentation regarding this. |
You should be able to close this. I was able to make it work without modifying. |
I am creating a new api plugin for salesforce. I was having trouble authenticating because Salesforece require request_type in the authorization call.
I added the response_type to the database config and then added this on line 247 of OauthComponent
The text was updated successfully, but these errors were encountered: