I'm trying to utilize a user's API key to allow me to post an update to an extension name programmatically. Including said key in URL, for example:
https://domain.com/app/extensions/e...d=f4a3809c-fa0c-47e6-967a-442113544ba1&page=0
This seems to satisfy the auth requirement when I post the form variables, as I get in response the list of extensions from extensions.php instead of the login page. However, the problem is that the response also includes the error message "Invalid Token" unless I first perform a GET and extract from the response the hidden token at the bottom of the form.
My intent here is not to have to perform a get and parse a response for a token where said token isn't even identified by a consistent ID - both the name and value are variable and there's no useful naming of the HTML element, so this makes for a really sloppy programmatic solution. The key value pair that has to be extracted and included in the post to succeed looks like
<input type='hidden' name='8cc63d24069b30110abd2325ba2248d8b9bed1f7c71e691c080ec34759cae0e5' value='e5b1e6a89d636cd3e81be34217b296d139055c8d936f9f8dd846786719dde889'>
Does anybody know of a way to post an update using just the API key + form data without having to parse this not-so-well-formed key value pair provided by an immediately preceding get?
https://domain.com/app/extensions/e...d=f4a3809c-fa0c-47e6-967a-442113544ba1&page=0
This seems to satisfy the auth requirement when I post the form variables, as I get in response the list of extensions from extensions.php instead of the login page. However, the problem is that the response also includes the error message "Invalid Token" unless I first perform a GET and extract from the response the hidden token at the bottom of the form.
My intent here is not to have to perform a get and parse a response for a token where said token isn't even identified by a consistent ID - both the name and value are variable and there's no useful naming of the HTML element, so this makes for a really sloppy programmatic solution. The key value pair that has to be extracted and included in the post to succeed looks like
<input type='hidden' name='8cc63d24069b30110abd2325ba2248d8b9bed1f7c71e691c080ec34759cae0e5' value='e5b1e6a89d636cd3e81be34217b296d139055c8d936f9f8dd846786719dde889'>
Does anybody know of a way to post an update using just the API key + form data without having to parse this not-so-well-formed key value pair provided by an immediately preceding get?