# Jwt

## Generate JWT Token

> All fields are optional, any missing fields will be excluded expect for "file" which will always begin with your vhost

```json
{"openapi":"3.1.1","info":{"title":"api.cdn.i3d.net","version":"ed6131ed-256"},"servers":[{"url":"https://api.cdn.i3d.net/api/"}],"security":[{"OAuth2Application":[]}],"components":{"securitySchemes":{"OAuth2Application":{"type":"oauth2","flows":{"application":{"tokenUrl":"https://id.i3d.net/connect/token"}}}},"schemas":{"model.JWTResponse":{"type":"object","properties":{"exp":{"type":"integer"},"file":{"type":"string"},"iat":{"type":"integer"},"ip":{"type":"string"},"iss":{"type":"string"},"nbf":{"type":"integer"},"sub":{"type":"string"},"token":{"type":"string"},"tokenSHA256Hash":{"type":"string"}}},"model.HTTPError":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}}},"model.JWTRequest":{"type":"object","properties":{"exp":{"type":"integer"},"file":{"type":"string"},"ip":{"type":"string"},"nbf":{"type":"integer"}}}}},"paths":{"/service/{serviceId}/jwt":{"post":{"description":"All fields are optional, any missing fields will be excluded expect for \"file\" which will always begin with your vhost","tags":["jwt"],"summary":"Generate JWT Token","parameters":[{"type":"string","description":"serviceId","name":"serviceId","in":"path","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.JWTResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.HTTPError"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.HTTPError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.JWTRequest"}}},"description":"JWT Request","required":true}}}}}
```

## Verify JWT Token

> Verify that a JWT token is valid and signed

```json
{"openapi":"3.1.1","info":{"title":"api.cdn.i3d.net","version":"ed6131ed-256"},"servers":[{"url":"https://api.cdn.i3d.net/api/"}],"security":[{"OAuth2Application":[]}],"components":{"securitySchemes":{"OAuth2Application":{"type":"oauth2","flows":{"application":{"tokenUrl":"https://id.i3d.net/connect/token"}}}},"schemas":{"model.JWTVerifyResponse":{"type":"object","properties":{"claims":{"type":"object","properties":{"exp":{"type":"integer"},"file":{"type":"string"},"iat":{"type":"integer"},"ip":{"type":"string"},"iss":{"type":"string"},"nbf":{"type":"integer"},"sub":{"type":"string"}}},"token":{"type":"string"},"valid":{"type":"boolean"}}},"model.HTTPError":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}}}}},"paths":{"/service/{serviceId}/jwt/{token}":{"get":{"description":"Verify that a JWT token is valid and signed","tags":["jwt"],"summary":"Verify JWT Token","parameters":[{"type":"string","description":"serviceId","name":"serviceId","in":"path","required":true},{"type":"string","description":"JWT Token","name":"token","in":"path","required":true}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.JWTVerifyResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.HTTPError"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/model.HTTPError"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.i3d.net/api-references/cdn/jwt.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
