> For the complete documentation index, see [llms.txt](https://docs.flxbl.io/flxbl/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flxbl.io/flxbl/sfp-server/api-reference/user-provider-identity.md).

# User Provider Identity

## POST /sfp/api/user/provider-identity/device/start

> Start an OAuth device flow to link a provider identity

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"51.20.0"},"security":[{"access-token":[]}],"components":{"securitySchemes":{"access-token":{"scheme":"bearer","bearerFormat":"JWT","type":"http","in":"header"}},"schemas":{"StartDeviceFlowDto":{"type":"object","properties":{"provider":{"type":"string","enum":["github","azuredevops"],"description":"Provider to link a user identity for"},"source":{"type":"string","enum":["web-device","desktop-device","cli-device"],"description":"Originating client surface (attribution only)"}},"required":["provider"]}}},"paths":{"/sfp/api/user/provider-identity/device/start":{"post":{"operationId":"UserProviderIdentityController_startDeviceFlow","summary":"Start an OAuth device flow to link a provider identity","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartDeviceFlowDto"}}}},"responses":{"403":{"description":"Forbidden - Requires role: owner, member"}},"tags":["User Provider Identity"]}}}}
```

## POST /sfp/api/user/provider-identity/device/poll

> Poll a device flow; links the identity on success

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"51.20.0"},"security":[{"access-token":[]}],"components":{"securitySchemes":{"access-token":{"scheme":"bearer","bearerFormat":"JWT","type":"http","in":"header"}},"schemas":{"PollDeviceFlowDto":{"type":"object","properties":{"flowId":{"type":"string","description":"The flow_id returned by device/start"},"source":{"type":"string","enum":["web-device","desktop-device","cli-device"],"description":"Originating client surface (attribution only)"}},"required":["flowId"]}}},"paths":{"/sfp/api/user/provider-identity/device/poll":{"post":{"operationId":"UserProviderIdentityController_pollDeviceFlow","summary":"Poll a device flow; links the identity on success","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PollDeviceFlowDto"}}}},"responses":{"403":{"description":"Forbidden - Requires role: owner, member"}},"tags":["User Provider Identity"]}}}}
```

## GET /sfp/api/user/provider-identity

> List the caller's linked provider identities

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"51.20.0"},"security":[{"access-token":[]}],"components":{"securitySchemes":{"access-token":{"scheme":"bearer","bearerFormat":"JWT","type":"http","in":"header"}}},"paths":{"/sfp/api/user/provider-identity":{"get":{"operationId":"UserProviderIdentityController_list","summary":"List the caller's linked provider identities","parameters":[],"responses":{"403":{"description":"Forbidden - Requires role: owner, member"}},"tags":["User Provider Identity"]}}}}
```

## DELETE /sfp/api/user/provider-identity/{id}

> Revoke a linked provider identity

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"51.20.0"},"security":[{"access-token":[]}],"components":{"securitySchemes":{"access-token":{"scheme":"bearer","bearerFormat":"JWT","type":"http","in":"header"}}},"paths":{"/sfp/api/user/provider-identity/{id}":{"delete":{"operationId":"UserProviderIdentityController_revoke","summary":"Revoke a linked provider identity","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"403":{"description":"Forbidden - Requires role: owner, member"}},"tags":["User Provider Identity"]}}}}
```

## POST /sfp/api/user/provider-identity/{id}/refresh

> Force a token refresh for a linked identity (debug / reconnect)

```json
{"openapi":"3.0.0","info":{"title":"sfp server","version":"51.20.0"},"security":[{"access-token":[]}],"components":{"securitySchemes":{"access-token":{"scheme":"bearer","bearerFormat":"JWT","type":"http","in":"header"}}},"paths":{"/sfp/api/user/provider-identity/{id}/refresh":{"post":{"operationId":"UserProviderIdentityController_refresh","summary":"Force a token refresh for a linked identity (debug / reconnect)","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"403":{"description":"Forbidden - Requires role: owner, member"}},"tags":["User Provider Identity"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.flxbl.io/flxbl/sfp-server/api-reference/user-provider-identity.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.
