Getting error when try to fetch profile

I am getting this error when i try to fetch my profile

{‘code’: -16, ‘message’: ‘Could not authenticate the user’, ‘s’: ‘error’}

My code is like

from fyers_apiv3 import fyersModel
client_id = "YJWZ21BLR-100"
access_token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhcGkubG9naW4uZnllcnMuaW4iLCJpYXQiOjE3MjYwNzc1NTUsImV4cCI6MTcyNjEwNzU1NSwibmJmIjoxNzI2MDc2OTU1LCJhdWQiOiJbXCJ4OjBcIiwgXCJ4OjF2NvZGUiLCJkaXNwbGF5X25hbWUiOiJZUjA0MjMxIiwib21zIjoiSzEiLCJoc21fa2V5IjoiOGZhYmQ3ZDE5MGRlY2M5NTM3ZGRhYzBjOGZhNzVjYzk4YjQ3OGM1YTczNjUyODkxY2FiMzdkMjMiLCJub25jZSI6IiIsImFwcF9pZCI6IllKV1oyMUJMRlIiLCJ1dWlkIjoiMmYzMTg2YjRhNzg5NDliN2JmODcyMzY5MmY1YmY4ZjMiLCJpcEFkZHIiOiIwLjAuMC4wIiwic2NvcGUiOiIifQ.iSYKzYBHlg3fn3oXMUlb-IpcPtUjhU1ZxtyTYRn7dyI"
fyers = fyersModel.FyersModel(client_id=client_id, token=access_token,is_async=False, log_path="")
response = fyers.holdings()
print(response)

When i tied ,is_async=False to True i am getting another error

<coroutine object FyersServiceAsync.get_async_call at 0x000002641D10CA40>

sys:1: RuntimeWarning: coroutine ‘FyersServiceAsync.get_async_call’ was never awaited

How to fix this error ?


Hey @BDOXzsTeuN

Could you please DM your details so that we can connect over a call and help with this

I’m also getting the same error. Same code was running well for months and all of a sudden, i’m not able to authenticate @WWhYB2qrsx

Can you help with resolution ?

Obtain a new valid access token and use it.

Hey @117802179492089190899 Are you facing the same issue with a fresh access token as well ? can you check it please

Yes, i even created a new app just to troubleshoot this issue from scratch. i’m getting new access token and using that to login.

Could you DM your contect details , we can connect over a call and check this

Hi Abhishek I am facing same issue, I created access token , still getting same error