Discussions
- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Security
- Mobile
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
- Force.com Discussion Boards
- :
- Developer Boards for Force.com and Database.com
- :
- Perl, PHP, Python & Ruby Development
- :
- force.com REST API OAuth fails on POST request ?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
force.com REST API OAuth fails on POST request ?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-15-2012 05:57 AM
I am using REST API for OAuth implementation from python, I am able to get the access token from refresh token, But unable to perform POST call for updating the records it give "Bad request" error.
The access Token is in Unicode so I have converter it to String.
Please refer the below code:
def standardRequestCreate(self, url, data, accessToken):
request = urllib2.Request(url)
request.add_header('Authorization','OAuth '+str(accessToken)) //"OAuth " sting appends to token
request.add_header('Content-type','application/jso
request.add_data(data)
jsonResponse = urllib2.urlopen(request)
return jsonResponse
How to implement POST call as its working for my GET request.

