-1

vueNative アプリでワードプレスで jwt を実装しています。API を呼び出すと、暫定的なヘッダーに警告が表示されます。403 エラーも発生しています。以下は、私が書いたコードです。

 axios.post('https://ishopee.in/wp-json/jwt-auth/v1/token',null,{
                    headers: {
                    'username': 'nayanjariwala123456789@gmail.com',
                    'password': 'Baby_0123'
                    }
                })
                .then(res => {
                    console.log("---->SuccessFully Login".res);
                })
                .catch(err => {
                    console.log('--->'+err); 
                })

そして、これは私がvueネイティブアプリから行ったリクエストです

header
Request URL: https://ishopee.in/wp-json/jwt-auth/v1/token
Request Method: POST
Status Code: 403 Forbidden
Referrer Policy: no-referrer-when-downgrade

Response Headers
Access-Control-Allow-Headers: Authorization, Content-Type
Access-Control-Expose-Headers: X-WP-Total, X-WP-TotalPages
Allow: POST
Alt-Svc: quic=":443"; ma=2592000; v="39,43,46", h3-22=":443"; ma=2592000
Cache-Control: no-store, no-cache, must-revalidate
Connection: Keep-Alive
Content-Type: application/json; charset=UTF-8
Date: Wed, 16 Oct 2019 08:33:00 GMT
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Link: <https://ishopee.in/wp-json/>; rel="https://api.w.org/"
null: HTTP/1.1 403 Forbidden
Pragma: no-cache
Server: LiteSpeed
Set-Cookie: PHPSESSID=dd9ecfdbdae48539a6bd1d1847d68c1d; path=/
Transfer-Encoding: chunked
X-Android-Received-Millis: 1571214780555
X-Android-Response-Source: NETWORK 403
X-Android-Selected-Protocol: http/1.1
X-Android-Sent-Millis: 1571214777449
X-Content-Type-Options: nosniff
X-Powered-By: PHP/7.1.28
X-Robots-Tag: noindex

Request Header
Provisional headers are shown
Accept: application/json, text/plain, */*
Content-Type: application/x-www-form-urlencoded
password: Baby_0123
username: nayanjariwala123456789@gmail.com

4

1 に答える 1