Jump to content
Updates to the Evernote Discussion Forums! Read more... ×
dipanshu

problem in Missing required oauth parameter "oauth_token"

Recommended Posts

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

Share this post


Link to post

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?

Share this post


Link to post

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.evernote.com/OAuth.action?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

Share this post


Link to post

@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.

Share this post


Link to post

@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/sugarcrm/evernote_test/index.php?action=requestToken

Share this post


Link to post

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

post-98145-0-84997400-1343374467_thumb.p

Share this post


Link to post

<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

Share this post


Link to post

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.

Share this post


Link to post

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

Share this post


Link to post

×