Skip to content
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

Invalid Verification Code #29

Closed
shreyan007 opened this issue Jan 22, 2017 · 7 comments
Closed

Invalid Verification Code #29

shreyan007 opened this issue Jan 22, 2017 · 7 comments
Assignees
Labels

Comments

@shreyan007
Copy link

Fatal error: Uncaught exception 'JKetelaar\fut\api\errors\login\MainLogin' with message 'Unable to login with unknown response With the following message: Incorrect verification code With error code: 295712' in C:\xampp\htdocs\compo\src\JKetelaar\fut\api\user\Login.php:381 Stack trace: #0 C:\xampp\htdocs\compo\src\JKetelaar\fut\api\user\Login.php(98): JKetelaar\fut\api\user\Login->postTwoFactorForm('https://signin....') #1 C:\xampp\htdocs\compo\src\JKetelaar\fut\api\API.php(123): JKetelaar\fut\api\user\Login->login() #2 C:\xampp\htdocs\compo\examples\login.php(8): JKetelaar\fut\api\API->login() #3 {main} thrown in C:\xampp\htdocs\compo\src\JKetelaar\fut\api\user\Login.php on line 381

Please help... I need help urgent
Thanks in advance.

@JKetelaar
Copy link
Owner

What two factor authentication method do you have enabled?

@shreyan007
Copy link
Author

shreyan007 commented Jan 24, 2017

When I updated your code with the login details and running it, I get a security code provided by EA to my email. After which I updated the bootstrap.php

$totp = new \OTPHP\TOTP('FIFA', 'Security Code form EA');

And then I get this error:

Fatal error: Uncaught exception 'JKetelaar\fut\api\errors\login\MainLogin' with message 'Unable to login with unknown response With the following message: Incorrect verification code With error code: 295712' in C:\xampp\htdocs\compo\src\JKetelaar\fut\api\user\Login.php:381 Stack trace: #0 C:\xampp\htdocs\compo\src\JKetelaar\fut\api\user\Login.php(98): JKetelaar\fut\api\user\Login->postTwoFactorForm('https://signin....') #1 C:\xampp\htdocs\compo\src\JKetelaar\fut\api\API.php(123): JKetelaar\fut\api\user\Login->login() #2 C:\xampp\htdocs\compo\examples\login.php(8): JKetelaar\fut\api\API->login() #3 {main} thrown in C:\xampp\htdocs\compo\src\JKetelaar\fut\api\user\Login.php on line 381

Just to be sure I'm on the right track:

  1. I'm running this code on localhost/Xampp
  2. Installed this plugin with composer

Objectives:
Collect Platform Data, Start Price, Buy It Now Price and Duration from current transfer list.

an urgent help is highly appreciated mate.
Thanks in advance :)

@JKetelaar
Copy link
Owner

Gotcha, I've received another issue (#27), I'll have to figure out what's wrong with this method.

If you can, I'd recommend to use TOTP in the meantime

@shreyan007
Copy link
Author

Can you tell me how to use the TOTP method

@JKetelaar
Copy link
Owner

Just released V0.0.5, which seems to work for me using Email authentication.
Can you test this for me with your account?

@nco-webdev
Copy link

@JKetelaar example would be appreciated. I've tried with my account and got
With the following message: Login failed
With error code: 295712

Regards

@JKetelaar
Copy link
Owner

Seems to be fixed for #27

Example code would be like:

<?php
require_once('vendor/autoload.php');

define('DATA_DIR', __DIR__ . '/data/');

$api = new \JKetelaar\fut\api\API('your@email.me', 'password', 'secret', 'email_callback', 'platform');

if($api->login() === true) {
    echo('We\'re logged in!' . "\n");

    $handler = $api->getHandler();
    foreach($handler->getTradepile() as $trade) {
        // Interact with $trade here
    }
}

function email_callback() {
    return 'YOUR_EMAIL_CODE';
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants