# Authentication API

## POST /sdk/token

> Generates an SDK access token for the provided email.

```json
{"openapi":"3.0.3","info":{"title":"Authentication API","version":"2.0"},"servers":[{"url":"https://api.gospace.app/authentication/v1","description":"UAT environment for SDK token generation"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}}},"paths":{"/sdk/token":{"post":{"description":"Generates an SDK access token for the provided email.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"The email address of the user requesting the token."},"expiry_minutes":{"type":"integer","description":"Optional token lifetime in minutes (default 60).","default":60,"minimum":1}},"required":["email"]}}}},"responses":{"200":{"description":"Successfully generated SDK access token.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the request was successful."},"data":{"type":"object","properties":{"access_token":{"type":"string","description":"JWT access token for SDK authentication."}},"required":["access_token"]},"identifier":{"type":"string","description":"Identifier for the response, e.g., 'auth_successful'."}},"required":["success","data","identifier"]}}}},"400":{"description":"Bad Request - Invalid input or missing required fields.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the request was successful."},"error":{"type":"object","properties":{"code":{"type":"integer","description":"HTTP status code."},"message":{"type":"string","description":"Error message describing the issue."}},"required":["code","message"]},"identifier":{"type":"string","description":"Identifier for the error, e.g., 'bad_request'."}},"required":["success","error","identifier"]}}}},"401":{"description":"Unauthorized - Invalid or missing API key.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the request was successful."},"error":{"type":"object","properties":{"code":{"type":"integer","description":"HTTP status code."},"message":{"type":"string","description":"Error message describing the issue."}},"required":["code","message"]},"identifier":{"type":"string","description":"Identifier for the error, e.g., 'unauthorised'."}},"required":["success","error","identifier"]}}}},"500":{"description":"Internal Server Error.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the request was successful."},"error":{"type":"object","properties":{"code":{"type":"integer","description":"HTTP status code."},"message":{"type":"string","description":"Error message describing the issue."}},"required":["code","message"]},"identifier":{"type":"string","description":"Identifier for the error, e.g., 'internal_server_error'."}},"required":["success","error","identifier"]}}}}}}}}}
```


---

# 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://developer.gospace.com/api-reference/authentication-api.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.
