# Retrieving/including Session IDs

**URL:** https://discourse.devontechnologies.com/t/retrieving-including-session-ids/3111
**Category:** Automation
**Created:** [August 26, 2006, 9:00am UTC](https://discourse.devontechnologies.com/t/retrieving-including-session-ids/3111 "2006-08-26T09:00:24Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![ionos](https://discourse.devontechnologies.com/letter_avatar_proxy/v4/letter/i/977dab/32.png) [@ionos](https://discourse.devontechnologies.com/u/ionos)
#### Post date: [August 26, 2006, 9:00am UTC](https://discourse.devontechnologies.com/t/retrieving-including-session-ids/3111/1 "2006-08-26T09:00:24Z")

</div>

Hi everyone,

I am trying to access various trademark databases via a to-be-developed plugin, and some of those seem to require a mandatory session id.

The session ID is included the search form’s action parameter, and valid for about an hour. Without a valid session ID, no go – all you get is “Session expired”.

So I guess I’d have to first get the actual search form, extract the session id, and then build this session id into the URL called by the DevonAgent plugin.

Can anyone offer me some advice how to go about this? Is this doable at all? Or am I missing the canonical way for dealing with the issue?

Cheers,  
i

---

<div class="post-metadata">

### Author: ![boneskull](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/boneskull/32/84_2.png) [@boneskull](https://discourse.devontechnologies.com/u/boneskull)
#### Post date: [August 26, 2006, 9:07am UTC](https://discourse.devontechnologies.com/t/retrieving-including-session-ids/3111/2 "2006-08-26T09:07:24Z")

</div>

Would it work to simply hardcode an existing session id into the URL?

---

<div class="post-metadata">

### Author: ![ionos](https://discourse.devontechnologies.com/letter_avatar_proxy/v4/letter/i/977dab/32.png) [@ionos](https://discourse.devontechnologies.com/u/ionos)
#### Post date: [August 26, 2006, 9:15am UTC](https://discourse.devontechnologies.com/t/retrieving-including-session-ids/3111/3 "2006-08-26T09:15:56Z")

</div>

> [@boneskull](#):
>
> Would it work to simply hardcode an existing session id into the URL?

Unfortunately not, because they expire after an hour.

I could, of course, rewrite the plugin on an hourly basis 😉 But that would kinda defeat the purpose of DevonAgent, I figure …

Cheers,  
I

---

<div class="post-metadata">

### Author: ![boneskull](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/boneskull/32/84_2.png) [@boneskull](https://discourse.devontechnologies.com/u/boneskull)
#### Post date: [August 28, 2006, 9:45pm UTC](https://discourse.devontechnologies.com/t/retrieving-including-session-ids/3111/4 "2006-08-28T21:45:10Z")

</div>

well, it’s probably complicated, but you could probably write an AppleScript to handle the session ID changes. have it launch a http request to your site, parse the sess ID out of the result, then use this:

[latenightsw.com/freeware/PLi … index.html](http://www.latenightsw.com/freeware/PListTools/index.html)

to modify your plugin .plist. then you can have AppleScript launch DEVONagent and run your search…

---

<div class="post-metadata">

### Author: ![ionos](https://discourse.devontechnologies.com/letter_avatar_proxy/v4/letter/i/977dab/32.png) [@ionos](https://discourse.devontechnologies.com/u/ionos)
#### Post date: [August 29, 2006, 7:35am UTC](https://discourse.devontechnologies.com/t/retrieving-including-session-ids/3111/5 "2006-08-29T07:35:50Z")

</div>

hi boneskull,

> [@boneskull](#):
>
> write an AppleScript to handle the session ID changes

thanks for the idea. for a bigger/more important problem, this would certainly be an option to consider.

however, i figure it takes more time to write all this code up, get it running reliably, and maintain it, than it will take to perform the few searches by hand. also, external dependencies tend to fail me …

cheers  
i

---

<div class="post-metadata">

### Author: ![boneskull](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/boneskull/32/84_2.png) [@boneskull](https://discourse.devontechnologies.com/u/boneskull)
#### Post date: [August 30, 2006, 9:40pm UTC](https://discourse.devontechnologies.com/t/retrieving-including-session-ids/3111/6 "2006-08-30T21:40:21Z")

</div>

> [@ionos](#):
>
> hi boneskull,  
> thanks for the idea. for a bigger/more important problem, this would certainly be an option to consider.

yes, this method is likely more trouble than its worth unless it’s something critical.

might be a nice idea for DT to open up the DA Cocoa Plugin API eventually, or expand the AppleScript-ability of DA to allow complex interactions with the search functionality… 🙂

---

<div class="post-metadata">

### Author: ![system](https://devontech-discourse.s3.dualstack.us-east-1.amazonaws.com/uploads/original/2X/4/4e6ff70c96be2eb307a274d890bba8d71ba671b3.png) [@system](https://discourse.devontechnologies.com/u/system)
#### Post date: [January 21, 2022, 10:57am UTC](https://discourse.devontechnologies.com/t/retrieving-including-session-ids/3111/7 "2022-01-21T10:57:48Z")

</div>


