nWallet

The worst idea in my life was to replace API keys access with this token stuff… I am getting something wierd from Envato API

{“message”:"‘TOKENCODE’ not a valid key=value pair (missing equal-sign) in Authorization header: ‘Bearer TOKENCODE’."}

It would be useful if someone form stuff (@rosssimpson) would intervene and give us a more info :slight_smile:

2 Likes

Hi @dysko!

I’d be happy to help. I see you opened a support ticket that was unfortunately closed before your question was answered. I have reopened that ticket and assigned it to the proper folks who will be able to help (and I’ll work with them).

I’ll be the first to admit that our API system hasn’t been particularly stable lately. We’re working to address some long-standing problems with it.

Can you please share some additional info (ideally in the support ticket, or in a DM) that led to that error above? I’d love to see the code and the HTTP request that resulted in the error. That shouldn’t be happening, so if you can provide the information we’ll investigate and find the problem.

Cheers!
Ross

2 Likes

Tnx. DM sent :wink:

Android issues:

BasicNetwork.performRequest: Unexpected response code 200 for https://api.envato.com/v1/market/private/user/earnings-and-sales-by-month.json
02-10 09:32:41.926 10455-10455/ba.dysko.envato D/ERROR: error => com.android.volley.NetworkError

Here I am using

StringRequest request = new StringRequest(Request.Method.GET, url, .... )
It’s strange

2 Likes

Dear dysko
Hi

I hope you are well.

nWallet is a good application, But currently it doesn’t work!!!

What’s happen to it ?
I added API code (API from Envato and also API got directly from your application) but unfortunately it shows 0 Sale, 0 Comment, 0 Income.

I uninstall and re-install application and re-add my account and API several times but unfortunately it didn’t work. It will be great if you fix these issues

I searched some other applications and web-based software,It will be great if you add some great features like “Verify a Purchase Code” that is implemented in http://leafping.com program.

If you can add “Verify a Purchase Code” with INVOICE NUMBER too it will be wonderful.

please visit http://leafping.com to see some great idea.

I’m waiting for new update for nWallet and also fixing the issue.

Thanks
Digiphic
http://www.digiphic.com
https://videohive.net/user/digiphic/portfolio

I am having issues with Envato API. Until it resolves, app will be down… Sorry guys :frowning:

2 Likes

those problems…they are on Envato’s side, or onb yours?

Let us know when the issue is solved with the api!

But how other applications are working correctly ?

For example these applications and websites are working correctly with same envato API:

http://leafping.com
Envato Pocket

It will be great if you fix issues sooner.
Thanks.

It is a free app, and the guy is working on a fix. Give him a break.

Thank you @dysko for the great app.

8 Likes

No problem ! I can wait :stuck_out_tongue_winking_eye:
I’m not addicted to nWallet
I’m not addicted to nWallet
I’m not addicted to nWallet
I’m not addicted to nWallet
I’m not addicted to nWallet
I’m not addicted to nWallet
I’m not addicted to nWallet…

2 Likes

Oh my god…
I’m addicted !!! :flushed:

6 Likes

Hope it will be fixed. Great app, but lately it was highly unstable and know stopped working completely (API keys doesnt work) I even tried to input them manually, with no luck. Please, let us know if it works!

Everything is still on hold until I get some more info from Envato. Sorry…

4 Likes

To bad, hope you can work it out :slight_smile:

@rosssimpson I found something in your response headers:

X-XSS-Protection:"1; mode=block”
content-security-policy-report-only:"default-src * data:; base-uri *; connect-src *; font-src public-assets.envato-static.com dmypbau5frl9g.cloudfront.net fonts.gstatic.com js.intercomcdn.com data:; img-src * data:; script-src * data: ‘unsafe-eval’ ‘unsafe-inline’; style-src * ‘unsafe-inline’; report-uri https://envatomarketplaces.report-uri.io/r/default/csp/reportOnly”

envatomarketplaces.report-uri.io -
Access Denied
Error code 15
This request was blocked by the security rules

2017-02-13 22:55:01 UTC

• Your IP188.124.214.160
• |Proxy IP107.154.141.27(ID 10474)
Incident ID: 474000170021976012-52662032861364504

What does this mean? Am I blocked by firewall or something?

No, that site is not the API and everyone gets Access Denied on it.
If you were blocked from the API you’d know because it would either give code 403 or a message saying you’re blocked (speaking from experience >_<)

@dysko You’re safe to ignore that. The content security policy is in report only mode and will not be impacting your requests. The X-XSS-Protection header is the same deal - it’s been there for the better part of 12 months.

There is something else causing your requests to fail here. I’ll take a look and report back shortly.

1 Like

@dysko I’ve performed an API request on the frontend from within a browser console and I’m unable replicate the issue you are getting.

Are you able to drop the following in a browser console and give me the entire output back?

var xhr = new XMLHttpRequest();
xhr.open('GET', 'https://api.envato.com/v1/market/private/user/account.json');
xhr.setRequestHeader('Authorization', 'Bearer <TOKEN>')
xhr.onload = function() {
  console.log('HTTP status: ' + xhr.status);
  console.log('HTTP response: ' + xhr.responseText);
};
xhr.send()
1 Like

All requests end up on

private void fetchAccountData( final Account account){
    String url = "https://api.envato.com/v1/market/private/user/account.json";
    JsonObjectRequest req = new JsonObjectRequest(Request.Method.GET, url,
            null, new Response.Listener<JSONObject>() {

        @Override
        public void onResponse(JSONObject response) {
            Log.d("ACCOUNT", response.toString());


        }
    }, new Response.ErrorListener() {
        @Override
        public void onErrorResponse(VolleyError error) {

            Log.e("ACCOUNT", " " + error.getMessage());

        }
    }) {

        /**
         * Passing some request headers
         */
        @Override
        public Map<String, String> getHeaders() throws AuthFailureError {
            HashMap<String, String> headers = new HashMap<String, String>();
            //headers.put("Content-Type", "application/json");
            headers.put("Authorization", "Bearer " + account.accessToken);
            return headers;
        }
    };

And Volley end with message:

02-14 05:14:51.464 9723-10327/ba.dysko.envato E/Volley: [180] BasicNetwork.performRequest: Unexpected response code 200 for https://api.envato.com/v1/market/private/user/account.json
02-14 05:14:51.490 9723-9723/ba.dysko.envato E/Volly Error: com.android.volley.NetworkError
02-14 05:14:51.490 9723-9723/ba.dysko.envato E/Volly Error: NetworkError

Yesterday, I with JavaScript I was getting two responses for one request… one would have empty response, and another one would have valid JSON. In my life, I had never seen this behaviour.