Provides a mechanism for having Surge create a signed token for embeds instead of signing with your own signing key.
Authorization
authorization AuthorizationBearer <token>
In: header
Path Parameters
user_id*string
The user for which the token represents authentication.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://api.surge.app/users/usr_01jymgdfrpec2asc5m0z3a6fr9/tokens" \ -H "Content-Type: application/json" \ -d '{ "duration_seconds": 900 }'{
"token": "eyJhbGciOiJFZERTQSIsImtpZCI6InNnbl8wMWp5bWowZ3AwZjNidmJmMmpyazRoYnd0ayIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NTA4ODkyMDgsInN1YiI6InVzcl8wMWp5bWdkZnJwZWMyYXNjNW0wejNhNmZyOSJ9.zKayo3EDrUm1Hw8URrofuYwajgyTu6dH2H0FEuRExprP1IV66FHa8wC3SfdzV7sR3AjDGAwkuAXztScq6rBnBw"
}{
"error": {
"message": "The requested resource could not be found.",
"type": "not_found"
}
}