I am using example code in python. I am not getting auth code in redirect uri.
What is client ID? The app id XXXXX-100 or YYYY_XXXXX-100 where YYYY is my user id. I tried both but it is not working.
# Import the required module from the fyers_apiv3 package
from fyers_apiv3 import fyersModel
# Replace these values with your actual API credentials
client_id = "G5FXXXXXX-100" # Format: "Client_ID_XXXXXX"
secret_key = "OBXXXXXX"
redirect_uri = "https://trade.fyers.in/api-login/redirect-uri/index.html"
response_type = "code"
state = "sample_state"
# Create a session model with the provided credentials
session = fyersModel.SessionModel(
client_id=client_id,
secret_key=secret_key,
redirect_uri=redirect_uri,
response_type=response_type
)
# Generate the auth code using the session model
response = session.generate_authcode()
# Print the auth code received in the response
print(response)
I get response as
What is wrong?