Jump to content

Welcome! You're currently a Guest.

If you'd like to join in the Discussion, or access additional features in our forums, please sign in with your Evernote Account here. Have an Evernote Account but forgot your password? Reset it! Don't have an account yet? Create One! You'll need to set your Display Name before your first post.

Photo

problem in Missing required oauth parameter "oauth_token"


  • Please log in to reply
8 replies to this topic

#1 dipanshu

dipanshu

  • PipPip
  • Title: Alliance Lackey
  • Group: Members
  • 72 posts

Posted 24 July 2012 - 08:02 AM

I have got problem to access https://sandbox.ever...om/OAuth.action
got error


Allow Access:



Please fix the following errors:
  • Missing required oauth parameter "oauth_token"
Do you authorize to access your account for up to 0 seconds, with permissions to:
even i have got token value and filled in edamtest.php and my api secret is even correct but still problem not solved .



so after going to https://sandbox.evernote.com/oauth
i got following error

HTTP Status 400 - Required: oauth_consumer_key

type Status report
message Required: oauth_consumer_key
description The request sent by the client was syntactically incorrect (Required: oauth_consumer_key).
Apache Tomcat/6.0.14

so how to resolve this error and where to append changes

on http://localhost/sug...on=requestToken

i got
Last action:Error obtaining temporary credentials: Invalid auth/bad request (got a -1, expected HTTP/1.1 20X or a redirect)
if you have any solution to above problems please reply

#2 Julien Boedec

Julien Boedec

  • Title: Browncoat
  • Group: Evernote Employee
  • 407 posts

Posted 24 July 2012 - 05:43 PM

It seems like you aren't providing any consumer key when requesting the temporary token. Could you please check that you are sending all the required information at the first step of the process?

#3 dipanshu

dipanshu

  • PipPip
  • Title: Alliance Lackey
  • Group: Members
  • 72 posts

Posted 25 July 2012 - 06:11 AM

sir i have send you detail in private msg.hope you have got it
i have put consumer secret key in config.php and even put token value in edamtest.php and i am using latest sdk of php
but problem is still coming.


still getting error on https://sandbox.ever...on?oauth_token=
it is not getting token value


Allow Access:



Please fix the following errors:
  • Missing required oauth parameter "oauth_token"
Do you authorize to access your account for up to 0 seconds, with permissions to:

how to resolve it

#4 SethH

SethH

  • Title: Evernote Employee
  • Group: Evernote Employee
  • 683 posts

Posted 25 July 2012 - 04:31 PM

@dipanshu It sounds like you are trying to run our OAuth sample code for PHP? To do that, you need to configure your environment with the PHP OAuth Extension, then inert your API consumer key and consumer secret into config.php. Those are the only steps that you should need to take.

You should not visit https://sandbox.evernote.com/oauth in a browser - this is an API endpoint from which you obtain OAuth request tokens and access tokens.

There are three steps in the OAuth authorization process - can you please clarify whether any of them are successful?

1) Obtain temporary credentials
2) Send the user to OAuth.action in a browser to authorize access
3) Exchange temporary credentials for an OAuth access token.

#5 dipanshu

dipanshu

  • PipPip
  • Title: Alliance Lackey
  • Group: Members
  • 72 posts

Posted 27 July 2012 - 05:37 AM

@dipanshu It sounds like you are trying to run our OAuth sample code for PHP? To do that, you need to configure your environment with the PHP OAuth Extension, then inert your API consumer key and consumer secret into config.php. Those are the only steps that you should need to take.

You should not visit https://sandbox.evernote.com/oauth in a browser - this is an API endpoint from which you obtain OAuth request tokens and access tokens.

There are three steps in the OAuth authorization process - can you please clarify whether any of them are successful?

1) Obtain temporary credentials
2) Send the user to OAuth.action in a browser to authorize access
3) Exchange temporary credentials for an OAuth access token.



sir problem is coming in first step only

Authentication Steps
  • Step 1: Click here to obtain temporary credentials
  • Step 2: authorize the temporary credentials
  • Step 3: exchange the authorized temporary credentials for token credentials
  • Step 4: list all notebooks in the authorizing user's Evernote account
Click here to start over
Current status

Evernote server: https://sandbox.evernote.com
NoteStore URL:
Web API URL prefix:

Last action: Error obtaining temporary credentials: Invalid auth/bad request (got a -1, expected HTTP/1.1 20X or a redirect)

it is coming on page
http://localhost/sug...on=requestToken

#6 dipanshu

dipanshu

  • PipPip
  • Title: Alliance Lackey
  • Group: Members
  • 72 posts

Posted 27 July 2012 - 07:34 AM

sir on going to localhost/phpinfo.php
i got

OAuth
OAuth support enabled PLAINTEXT support not supported RSA-SHA1 support not supported HMAC-SHA1 support enabled source version $Id: oauth.c,v 1.56 2009/05/10 06:40:59 jawed Exp $ version 0.99.9

so if it is problem with oauth or something else

sir after changes to php.ini display_errors =on
i got

NoteStore URL: Notice: Undefined index: noteStoreUrl in /var/www/sample/oauth/index.php on line 123
Web API URL prefix: Notice: Undefined index: webApiUrlPrefix in /var/www/sample/oauth/index.php on line 125

the code on which is showing error is of you provided in sample
but i cant do changes.


<b>NoteStore URL:</b> <?php echo $_SESSION['noteStoreUrl']; ?>
<br/>
<b>Web API URL prefix:</b> <?php echo $_SESSION['webApiUrlPrefix']; ?>

these are lines 123 and 125
so can you please tell me why i m getting these error

Attached Files



#7 dipanshu

dipanshu

  • PipPip
  • Title: Alliance Lackey
  • Group: Members
  • 72 posts

Posted 27 July 2012 - 12:02 PM

<b>Evernote server:</b> <?php echo EVERNOTE_SERVER; ?>
<br/>
<b>NoteStore URL:</b> <?php
if(isset($_SESSION['noteStoreUrl']))
{
echo $_SESSION['noteStoreUrl'];
} ?>
<br/>
<b>Web API URL prefix:</b> <?php
if(isset($_SESSION['webApiUrlPrefix']))
echo $_SESSION['webApiUrlPrefix']; ?>
</p>

after changes i am not getting anything now in

Evernote server: https://sandbox.evernote.com
NoteStore URL:
Web API URL prefix:

Last action: Error obtaining temporary credentials: Invalid auth/bad request (got a -1, expected HTTP/1.1 20X or a redirect)
Temporary credentials:

still that error remains

#8 Lil Dre

Lil Dre

  • PipPip
  • Title: Alliance Lackey
  • Group: Members
  • 71 posts

Posted 30 July 2012 - 01:08 PM

try to dissable SSL checks in the sample/oauth/fuctions.php

like:

function getTemporaryCredentials() {
$_SESSION['t_date'] = $_POST['t_date'];
$_SESSION['t_date2'] = $_POST['t_date2'];
$_SESSION['t_tag'] = $_POST['t_tag'];
global $lastError, $currentStatus;
try {
$oauth = new OAuth(OAUTH_CONSUMER_KEY, OAUTH_CONSUMER_SECRET);
$oauth->disableSSLChecks();
.....................
.........

if you see "$oauth = new OAuth(OAUTH_CONSUMER_KEY, OAUTH_CONSUMER_SECRET);", just put "$oauth->disableSSLChecks();" on.

#9 dipanshu

dipanshu

  • PipPip
  • Title: Alliance Lackey
  • Group: Members
  • 72 posts

Posted 30 July 2012 - 01:39 PM

try to dissable SSL checks in the sample/oauth/fuctions.php

like:

function getTemporaryCredentials() {
$_SESSION['t_date'] = $_POST['t_date'];
$_SESSION['t_date2'] = $_POST['t_date2'];
$_SESSION['t_tag'] = $_POST['t_tag'];
global $lastError, $currentStatus;
try {
$oauth = new OAuth(OAUTH_CONSUMER_KEY, OAUTH_CONSUMER_SECRET);
$oauth->disableSSLChecks();
.....................
.........

if you see "$oauth = new OAuth(OAUTH_CONSUMER_KEY, OAUTH_CONSUMER_SECRET);", just put "$oauth->disableSSLChecks();" on.




function getTemporaryCredentials() {
$_SESSION['t_date'] = $_POST['t_date'];
$_SESSION['t_date2'] = $_POST['t_date2'];
$_SESSION['t_tag'] = $_POST['t_tag'];
global $lastError, $currentStatus;
try {
$oauth = new OAuth(OAUTH_CONSUMER_KEY, OAUTH_CONSUMER_SECRET);
$oauth->disableSSLChecks();
$requestTokenInfo = $oauth->getRequestToken(REQUEST_TOKEN_URL, getCallbackUrl());
if ($requestTokenInfo) {
$_SESSION['requestToken'] = $requestTokenInfo['oauth_token'];
$_SESSION['requestTokenSecret'] = $requestTokenInfo['oauth_token_secret'];
$currentStatus = 'Obtained temporary credentials';
not solved




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Clip to Evernote