E
E
EpicUsaMan2016-05-25 12:54:49
PHP
EpicUsaMan, 2016-05-25 12:54:49

Invalid_request Yandex Money?

https://github.com/yandex-money/yandex-money-sdk-php
This API implementation has a method

API::buildObtainTokenUrl($client_id, $redirect_uri, $scope);

I have it implemented like this:
$scope = array('account-info', 'money-source("wallet","card")', 'payment.to-account("'.ACCOUNT.'","account").limit('.$_POST['limit_time'].','.$_POST['limit'].')');
$auth_url = API::buildObtainTokenUrl(CLIENT_ID, REDIRECT_URI, $scope);

All parameters are entered, a link is generated, it is even quite possible to log in there and it understands what kind of site is requesting data, which means that the CLIENT_ID is correct.
I tried REDIRECT_URI and $scope inside the method in the last sprintf() to transform both urlencode() and rawurlencode()
But it's useless.
Yandex support is silent, and help is urgently needed.
Apparently, it does not complain about scope either, because then it would return a different error.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Orc, 2017-04-29
@z0ddak

"The Redirect URI in the application settings and the Redirect URI in the request must be the same." - this is true, but also to everything where you have escaped quotes: money-source("wallet","card"), etc.? Here is what Yandex.Money advises about this:
...there may be characters that violate the syntax of scope , for example, a double quote.
For such characters, backslash escaping should be used according to the JSON format. For example: \"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question