hello, My goal is to add this geojson file to the feature layer in my Arcgis Online account. I am creating an api key from my Arcgis Developer account. But I don't see an option for this api key to access the layers in my Arcgis Online account. I give all authorisations from Scope, but I still get a 403 error....
Solved! Go to Solution.
Hi @aydemiremrah,
You have limited functionality with the token generated from the developers page. You will want to generate a token using the generateToken method using a username/password.
Hi @aydemiremrah,
You have limited functionality with the token generated from the developers page. You will want to generate a token using the generateToken method using a username/password.
@JakeSkinner Hello, thank you for the answer. Is there any way to create a permanent api key? I want to assign an api key with no time limit on my server. Token keys last a maximum of 15 days.
Unfortunately, not. 15 days is the max.
@JakeSkinner Thank you. If you were doing a similar project, what method would you prefer? Would you use something like a middleware that checks whether the token has expired and automatically renews it if it has expired? Obviously, I don't want to store a username and password directly in my project.
@aydemiremrah I don't have much experience with JavaScript, but if I were doing this in python, I would store the username/password in a secure config file that the script would call. The script would retrieve the username/password and generate the token.