Identify the calling key
const url = 'https://api.1up.gift/me';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.1up.gift/me \ --header 'Authorization: Bearer <token>'Returns the customer the API key was issued to, the service account it acts as, and the environment it is valid in. Useful as a first call to confirm a key works and is pointed at the right environment.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The key is valid; the caller it identifies is returned.
Who the calling API key belongs to.
object
The customer the key was issued to. Every call is scoped to this customer.
The environment the key is valid in, for example production or staging.
The customer’s name.
The service account this key belongs to — who the API acts as, and what every order it places is attributed to.
The service account’s name, as it appears in reporting.
Who the calling API key belongs to.
object
The customer the key was issued to. Every call is scoped to this customer.
The environment the key is valid in, for example production or staging.
The customer’s name.
The service account this key belongs to — who the API acts as, and what every order it places is attributed to.
The service account’s name, as it appears in reporting.
Examplegenerated
{ "customerId": 1, "environment": "example", "customerName": "example", "serviceAccountId": 1, "serviceAccountName": "example"}Who the calling API key belongs to.
object
The customer the key was issued to. Every call is scoped to this customer.
The environment the key is valid in, for example production or staging.
The customer’s name.
The service account this key belongs to — who the API acts as, and what every order it places is attributed to.
The service account’s name, as it appears in reporting.
Examplegenerated
{ "customerId": 1, "environment": "example", "customerName": "example", "serviceAccountId": 1, "serviceAccountName": "example"}