# Token-based registration

Source: [https://docs.qualcomm.com/doc/80-42204-1/topic/24_Token_based_registration_using_a_license.html](https://docs.qualcomm.com/doc/80-42204-1/topic/24_Token_based_registration_using_a_license.html)

The Terrestrial Positioning Service (TPS) JSON API also uses a token-based registration model,
        which:

- Enables devices to generate a unique registration token.
- Provides access to the TPS solution for a set period using the generated token.

Note: A license agreement is
        required for token-based registration of the TPS JSON API. For more information about the
        license agreement, contact the Qualcomm TPS team at [sales.tps@qti.qualcomm.com](mailto:sales.tps@qti.qualcomm.com).

The service period of the generated token is configured by the Qualcomm TPS team based on the
        duration or term agreed upon in the license agreement. This team can also configure post
        term license period on a project-by-project basis. For support, contact the Qualcomm TPS
        team at [support.tps@qti.qualcomm.com](mailto:support.tps@qti.qualcomm.com).

### Token registration request 

All the fields in the following token registration request are encoded into the HTTP header.
        There are no registration and authentication elements in the request message.

    GET /registration-token HTTP/1.1 
    Host: global.skyhook.com:8080 
    Skyhook-Auth-Key: YOUR API KEY HERE 
    Skyhook-Device-Model: Sample-Device-Model 
    Skyhook-PID: DEVICE SERIAL #, MAC ADDRESS OR OTHER UID HERE 
    Skyhook-CC: 300 (Optional)
    Copy to clipboard

Note: It's recommended not to store the API key directly on the client
        device.

Table : TPS API token registration request fields

| Field | Description |
| --- | --- |
| `Skyhook-Auth-Key` | The API key provided for this project. |
| `Skyhook-Device-Model` | The device model for which this token is being generated. |
| `Skyhook-PID` | A unique and persistent ID for the device. |
| `Skyhook-CC` | (Optional) The three-digit Mobile Country Code (MCC) from a cellular service. |

### Token registration response

The response provides a registration token, and the subsequent location requests should use this
        token in their HTTP headers. Store the token securely on the client device for use.

    Skyhook-Auth-Token: SGVyZSdzIHRoYXQgdG9rZW4geW91IGFza2VkIGZvci4= Copy to clipboard

An example of the location request format using the `Skyhook-Auth-Token` header is
        as follows:

    curl -H "Content-Type: text/xml" -H "X-Forwarded-For: 127.0.0.1" -H 
    "Skyhook-Auth-Token: SGVyZSdzIHRoYXQgdG9rZW4geW91IGFza2VkIGZvci4" -d @location_rq.xml 
    https://global.skyhookwireless.com/wps2/locationCopy to clipboard

### Token registration HTTP status codes

The following table provides a list of observable HTTP status codes for TPS API token
        registration.

Table : HTTP status codes for TPS API token registration

| Status code | Response | Description |
| --- | --- | --- |
| `200` | `Success` | Valid registration request. |
| `200` | `Success` | Retransmission of the token when the request is made from a device that's<br>                already registered. |
| `501` | `Not Extended` | Client service has expired and can't be registered again unless post-term license<br>                  terms are negotiated.<br><br><br>                <br>In this case, the client device shouldn't continue to send repeated registration<br>                  requests. Instead, it's recommended to implement a registration retry method on<br>                  each restart of the device. |
| `511` | `Network Authentication Required` | Token expired or not provided. The device should send a registration message to<br>                receive a valid token before requesting location information. |

Last Published: Mar 17, 2026

[Previous Topic
Sample TPS JSON API request](https://docs.qualcomm.com/bundle/publicresource/80-42204-1/topics/sample-aps-json-api-request.md) [Next Topic
Forward location response using Echo](https://docs.qualcomm.com/bundle/publicresource/80-42204-1/topics/25_TPS_JSON_API_for_IoT__Echo_.md)