INVALID_APP_KEY error code when requesting lists from JSONRPC

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Abw
    Junior Member
    • Sep 2022
    • 3

    #1

    INVALID_APP_KEY error code when requesting lists from JSONRPC

    Hi there,

    I am attempting to access lists, eg listEventTypes, having successfully logged in via my python script, but i get an error '-32099' and 'ANGX-0007' and error code INVALID_APP_KEY, and when consulting the forums this suggests my sessionToken is not associated with my Application Key. How do i resolve this?



    thanks
    A​
  • jabe
    Senior Member
    • Dec 2014
    • 705

    #2
    I would have expected the suggestions from the forum to result in an invalid sessionToken message rather than an invalid app key message, but I have been wrong before (it was a Tuesday, as I recall).

    Do you have processing to get the sessionToken? I find that they tend to be long-lived (several hours), slightly contrary to what is suggested. This means once I've logged in I can stop and restart my program several times without needing to log in again. That said, Keep Live and Log Out don't seem to do anything. Maybe I coded them wrong.

    I would suggest that you arrange for your program to show you the JSON string for your request so that you can check its contents. You could also display the sessionToken when you first get hold of it.

    Comment

    • pwebtech
      Member
      • Apr 2021
      • 49

      #3
      i guess if I was getting and invalid app key error rather than invalid session token, i'd assume the session token was still OK and that it was my app key that was wrong, so ... given I've got two app keys (live and dev) i'd check that somehow the session token/app key pair i used to login was the same as the session token/app key pair used to call lists?

      Comment

      • jabe
        Senior Member
        • Dec 2014
        • 705

        #4
        Well, it's certainly something to check, but from my point of view I'd expect the app key to be defined and given a value in one and only place in a program. That confers several advantages and is something I'd do generally in a program as a matter of course. In this instance, it means that if you want to change between your live and dev keys you only need to do it in one place. But, yes, if the value of the app key for a call was not the same as the app key used to log in, then it would make sense for the error message to reject it.

        Comment

        Working...
        X