pyTigerGraph - refreshToken() Method Error

When invoking refreshToken() method using pyTigerGraph (v 1.0.1) / pyTigerDriver (v 1.0.14), I receive the following error: The request cannot be processed: expected a JSON payload, but a query string was given.

Hi @demit733 , thanks for reporting the error. Could you provide a few more details for us to debug the issue?

  1. Is token authorization turned on from the database side?
  2. If so, are you able to do getToken() in the first place?

Thanks!

Best,
Bill

1 Like

Hi Bill,

  1. Is token authorization turned on from the database side?
  2. If so, are you able to do getToken() in the first place?

Yes, I was able to create a secret and then the token. If you look at the pyTigerGraph refrehToken() method, you will see that the code is written incorrectly for the type of call that is being made. You need to pass the data as dictionary on the request “put” call. Also, the timestamp that is returned, is incorrect.

Kind Regards,

Mitch DeFelice

Thanks for the detail, Mitch. We are working on a fix for the request. The timestamp issue will need further investigation. The fix should be pushed to github soon. Thanks again for your help to make pyTigerGraph better.

Fixed in Merge pull request #37 from tigergraph/refreshToken-fix · tigergraph/pyTigerGraph@0ab9448 · GitHub . It will be included in the next patch. For now, you can pip install for github: pip install git+https://github.com/tigergraph/pyTigerGraph.git

2 Likes