Access token errors - Fixed


I am having issues accessing the api and retrieving data.

Access/JWT token is being generated but the below error is displayed when trying to fetch data from the API.

Access Token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJtZXJjaGFudCIsImlzcyI6InBheXRtbW9uZXkiLCJpZCI6NTU0Nzc0LCJleHAiOjE2OTY2MTY5OTl9.jPi86Rkqda9Ci5G0xVu5qm24_4fwQm8k4DOc0X0uHy0
Failed to retrieve data. Status code: 401
Response Text: {“status”:401,“message”:“Invalid Access Token”,“error_code”:“PM_OPEN_API_0001”}

Using a simple python script. ALso, after the failed attempt I have to religion and regenerate the access-token to fetch the JWT Token, is that a desired behaviour?


Hello @suyesh ,

You’re attempting to use the option-chain API with a public_access_token.

However, it should be accessed with either {access_token} or {read_access_token} instead.

For more information, please consult the documentation at