# Método de autenticación - getToken

##### <span class="api-method" data-method="POST">POST</span> https://api.service24gps.com/api/v1/gettoken

Para obtener acceso las aplicaciones y herramientas de los clientes deben solicitar a través del servicio una llave (Token) de autenticación que le permitirá hacer uso de los servicios durante **seis horas continuas**, una vez transcurrido este periodo de tiempo, se debe volver a solicitar otro Token de autenticación.

<details class="mb-m" id="bkmrk-body-parametersparam"><summary class="text-muted">Ver parámetros de solicitud:</summary>

<div><table class="table" style="width: 810px; height: 348px;"><tbody><tr style="height: 41px;"><th style="width: 133px; height: 41px;">Parámetros</th><th style="width: 306px; height: 41px;">Descripción</th><th style="width: 93px; height: 41px;">Longitud </th><th style="width: 278px; height: 41px;">Ejemplo</th></tr><tr style="height: 58px;"><td style="width: 133px; height: 58px;">apikey</td><td style="width: 306px; height: 58px;">Llave de autorización para uso de los Servicios Web.</td><td style="width: 93px; height: 58px;"><span role="presentation" style="padding-right: 0.1px; color: #3366ff;"> 50</span></td><td style="width: 278px; height: 58px;"><span role="presentation" style="padding-right: 0.1px; color: #3366ff;">25sdsd234234aa93sdsdsd37c70118e72</span></td></tr><tr style="height: 41px;"><td style="width: 133px; height: 41px;">token</td><td style="width: 306px; height: 41px;">Debe ir en blanco como cadena vacía.</td><td style="width: 93px; height: 41px;"><span role="presentation" style="padding-right: 0.1px; color: #3366ff;">500</span></td><td style="width: 278px; height: 41px;"> </td></tr><tr style="height: 75px;"><td style="width: 133px; height: 75px;">username</td><td style="width: 306px; height: 75px;">Un usuario autorizado para usar el servicio por parte del cliente y debe estar definido previamente.</td><td style="width: 93px; height: 75px;"><span style="color: #3366ff;"> 150</span></td><td style="width: 278px; height: 75px;"><span style="color: #3366ff;">usuario</span></td></tr><tr style="height: 41px;"><td style="width: 133px; height: 41px;">password</td><td style="width: 306px; height: 41px;">Contraseña asociada al usuario.</td><td style="width: 93px; height: 41px;"><span style="color: #3366ff;"> 50</span></td><td style="width: 278px; height: 41px;"><span style="color: #3366ff;">contraseña</span></td></tr><tr style="height: 92px;"><td style="width: 133px; height: 92px;">get\_info</td><td style="width: 306px; height: 92px;">Opcional, si se desea obtener el idusuario, usuario, idcliente, nombre de cliente, token y el tiempo restante del token se debe utilizar este parámetro.</td><td style="width: 93px; height: 92px;"><span style="color: #3366ff;"> 1</span></td><td style="width: 278px; height: 92px;"><span style="color: #3366ff;">0</span></td></tr></tbody></table>

</div></details>##### Solicitud de ejemplo:

```shell
curl --location --request POST 'https://api.service24gps.com/api/v1/gettoken' \
--form 'apikey="25sdsd234234aa93sdsdsd37c70118e72"' \
--form 'token=""' \
--form 'username="usuario"' \
--form 'password="contraseña"' \
```

##### Respuesta de ejemplo:

```JSON
{
	"status": 200,
	"data": "wfszR/oPIQKjt5HT5NgjDnZ2SAZQ=="
}
```