[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Magento REST API

Posted on 2013-11-27
4
Medium Priority
?
909 Views
Last Modified: 2016-03-02
I’m following these steps here for testing the Magento REST API http://www.magentocommerce.com/api/rest/testing_rest_resources.html

The REST API is working for the GET Product for Guests http://temp.pramier.com/api/rest/products

To make use of the API for anything else I need to use the OAuth

I have the OAuth Consumer setup for this URL http://temp.pramier.com

Now when I use the FireFox REST Client as per the link above I enter the consumer key and consumer secret.
POST http://temp.pramier.com/oauth/initiate 

This is the responce I get:
Status Code: 400 Bad Request
“oauth_problem=parameter_absent&oauth;_parameters_absent=oauth_callback”

My question is: What should the Callback URL be in Magento? I have tried it various ways and can’t get it to work to get the tokens. I've search all over and there seem to be no clear documentation on this.

This is what I have tried among other ways for the callback URL and it does not work: http://temp.pramier.com/index.php/oauth/authorize

Can someone help me?
0
Comment
Question by:Gerhardpet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 14

Expert Comment

by:jb1dev
ID: 39682368
Well, the example says this needs to point to the oath_customer.php script, whatever that is.
Presumably this script is provided to you somehow?

// $callbackUrl is a path to your file with OAuth authentication example for the Customer user
$callbackUrl = "http://yourhost/oauth_customer.php";
$temporaryCredentialsRequestUrl = "http://yourhost/oauth/initiate?oauth_callback=" . urlencode($callbackUrl);
$customerAuthorizationUrl = 'http://yourhost/oauth/authorize';
$accessTokenRequestUrl = 'http://yourhost/oauth/token';
$apiUrl = 'http://yourhost/api/rest';
$consumerKey = 'yourconsumerkey';
$consumerSecret = 'yourconsumersecret';

Open in new window

0
 
LVL 1

Author Comment

by:Gerhardpet
ID: 39682512
The php script is one way of testing it but in my case I'm using the FireFox REST API client.

This seems to point to something but no one has responded

https://code.google.com/p/oauth/issues/detail?id=200
0
 
LVL 1

Accepted Solution

by:
Gerhardpet earned 0 total points
ID: 39683622
I got far enough in to this to find out that the error I'm getting is not related to the CallBack URL.

This error “oauth_problem=parameter_absent&oauth;_parameters_absent=oauth_callback” is related to the OAuth but so far I can't find out why I get the error
0
 
LVL 1

Author Closing Comment

by:Gerhardpet
ID: 40372514
I never got this to work and nothing helped was posted here to help with this
0

Featured Post

Cyber Threats to Small Businesses (Part 2)

The evolving cybersecurity landscape presents SMBs with a host of new threats to their clients, their data, and their bottom line. In part 2 of this blog series, learn three quick processes Webroot’s CISO, Gary Hayslip, recommends to help small businesses beat modern threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question