ドキュメントに記載されている手順に従って、フリップカート販売者 API - 開発者管理ポータルに登録したため、フリップカート販売者 API にアクセスしようとしています。
https://seller.flipkart.com/api-docs/FMSAPI.html
アクセス トークンの生成に使用される最初の API をヒットすると Flipkart に正常に登録された後、コードを介してこの API をヒットすると、応答としてログイン ページ html が返されます。また、次の手順で郵便配達員を介してこれをヒットしようとしました:-
1)Type of request i tried with both (GET,POST)
2)Set appid and app-secret in the header
3)Use the following url:-
https://api.flipkart.net/oauth-service/oauth/token\?grant_type\=client_credentials\&scope=Seller_Api
私が得る次の応答:-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Flipkart</title>
<link type="text/css" rel="stylesheet"
href="./style.css" />
<link type="text/css" rel="stylesheet"
href="./bootstrap.css" />
</head>
<body>
<div class="navbar navbar-default navbar-static-top" role="navigation">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="#">Flipkart Permission Registration</a>
</div>
</div>
</div>
<div class="container">
<form id="loginForm" name="loginForm" role="form" class="form-signin" action="login.do" method="post">
<h2 class="form-signin-heading">Please sign in </h2>
<input type="email" class="form-control" placeholder="Email address"
name='j_username' required="" autofocus="">
<input type="password" name='j_password' class="form-control"
placeholder="Password" required="">
<button class="btn btn-lg btn-primary btn-block" type="submit" name="login">Sign in</button>
<input type="hidden" name="CSRFToken" value="987f582b-9a4e-4c6c-a14b-681f2b57ca34"></input>
</form>
</div>
</body>
</html>
彼らが提供したサンドボックス URL も試してみましたが、どちらの場合も同じ応答でした。
この問題をグーグルで検索すると、URLを次のように変更する必要がある場所が見つかりました:-
https://api.flipkart.net/oauth-service/oauth/token?grant_type=client_credentials&scope=Seller_Api
私もこれを試しましたが、これは次のように応答を返します:-
{
"error": "unauthorized",
"error_description": "An Authentication object was not found in the SecurityContext"
}
最後に、フリップカート販売者 API のアクセス トークンを取得できません。助けてください 助けていただければ幸いです ありがとう!