> For the complete documentation index, see [llms.txt](https://developer.ivvy.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.ivvy.com/events/create-login-token.md).

# Create Login Token

## Create Login Token

<mark style="color:green;">`POST`</mark> `[PlatformAddress]/api/1.0/event?action=createLoginToken`

#### Path Parameters

| Name     | Type    | Description                                                              |
| -------- | ------- | ------------------------------------------------------------------------ |
| event    | integer | The event identifier for the contact to be logged in to                  |
| contact  | integer | The contact identifier to allow the login                                |
| referrer | string  | Referrer of the request which will be used in validating the token later |

{% tabs %}
{% tab title="200 " %}

```
{
  "token":"fc877d1bae56ebc5a8e19b29a3df67de",
  "loginUrl":"http://wired.ivvy.com/event/SQ6EXR/registration/login/token?t=fc877d1bae56ebc5a8e19b29a3df67de&contact=297466"
}
```

{% endtab %}
{% endtabs %}

## Example Request

`Example: Request a login token for a contact on an event`

```javascript
{
  "event":15593,
  "contact":297466
}
```

## Description

Creates a login token that can be used to login to an event, on the behalf of a registered contact. This call takes an event identifier and a contact identifier and an optional referrer url to generate a single-use, time restricted token.

The result will be the token and a URL that can be used to redirect the user to have them logged in to view their registration details without the use of a username and password.

If the referrer is provided when creating the token, the browser’s referrer header will also be checked to ensure the request using the token has been redirected from the specific website saved against the token.

## Returns

| Property | Description                                                                          |
| -------- | ------------------------------------------------------------------------------------ |
| token    | Single use, time restricted token for the contact to login to the iVvy Event Website |
| loginUrl | The URL that must be used to authenticate the user with the token                    |

## Throws

| Code                 | Description              |
| -------------------- | ------------------------ |
| Specific Code: 24099 | Unable to generate token |
| Specific Code: 24098 | Unable to find event     |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.ivvy.com/events/create-login-token.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
