Public API: a short-lived token from a secret key (not billed)
POST
/v1/tokens
const url = 'https://api.tareky.com/v1/tokens';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"scopes":["maps"],"allowedOrigins":["example"],"ttlSeconds":3600}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.tareky.com/v1/tokens \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "scopes": [ "maps" ], "allowedOrigins": [ "example" ], "ttlSeconds": 3600 }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”x-access-key-id
string
Legacy key id (until its sunset)
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
scopes
Array<string>
allowedOrigins
Array<string>
ttlSeconds
integer
Responses
Section titled “Responses”Media typeapplication/json
object
token
required
Tareky_tk_…, sent like a public key: ?access_token= or Authorization: Bearer
string
expiresAt
required
string
scopes
required
Array<string>
allowedOrigins
required
Array<string>
Examplegenerated
{ "token": "example", "expiresAt": "example", "scopes": [ "example" ], "allowedOrigins": [ "example" ]}Rate limit or monthly quota exceeded; see Retry-After
Media typeapplication/json
object
error
required
object
code
required
Stable machine-readable code, e.g. quota_exceeded, no_route
string
message
required
string
status
required
integer
details
For invalid_request: the validation issues
docsUrl
required
string
requestId
string
Examplegenerated
{ "error": { "code": "example", "message": "example", "status": 1, "details": "example", "docsUrl": "example" }, "requestId": "example"}default
Section titled “default”Any other error, in the /v1 error envelope
Media typeapplication/json
object
error
required
object
code
required
Stable machine-readable code, e.g. quota_exceeded, no_route
string
message
required
string
status
required
integer
details
For invalid_request: the validation issues
docsUrl
required
string
requestId
string
Examplegenerated
{ "error": { "code": "example", "message": "example", "status": 1, "details": "example", "docsUrl": "example" }, "requestId": "example"}