I'm not sure what your question is here. The API is another way to read and write configurations in the Meraki world. It doesn't really use a login system as you have with the regular dashboard. It simply adds the API key to each request. This means that there isn't really a "session" in the API world.
Could you explain in more detail what exactly you're trying to do?
@MeredithW, could you move this to Dashboard & Administration?