Issue a new access token.
curl --request POST \
--url https://a.s2.dev/v1/access-tokens \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"scope": {
"access_tokens": {
"exact": "<string>"
},
"basins": {
"exact": "<string>"
},
"op_groups": {
"account": {
"read": false,
"write": false
},
"basin": {
"read": false,
"write": false
},
"stream": {
"read": false,
"write": false
}
},
"ops": [],
"streams": {
"exact": "<string>"
}
}
}
'{
"access_token": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}access tokens
Issue a new access token.
Issue a scoped S2 access token for specific resources and operations.
POST
/
access-tokens
Issue a new access token.
curl --request POST \
--url https://a.s2.dev/v1/access-tokens \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"scope": {
"access_tokens": {
"exact": "<string>"
},
"basins": {
"exact": "<string>"
},
"op_groups": {
"account": {
"read": false,
"write": false
},
"basin": {
"read": false,
"write": false
},
"stream": {
"read": false,
"write": false
}
},
"ops": [],
"streams": {
"exact": "<string>"
}
}
}
'{
"access_token": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}Access token concepts
Review token scopes, permissions, expiry, and revocation behavior.
Issued tokens use the scope in this request. Scope fields and
auto_prefix_streams
are not inherited from the caller, and requested access must be no broader than
the caller’s effective permissions. See the token issuance scope
rules.Set
network_policy to restrict which networks the token can be used from. See network policies.Authorizations
Body
application/json

