# auth
## Module Functions
### Exchange Code <a name="exchange_code"></a>
Exchange one-time auth key for api key
**API Endpoint**: `GET /auth/exchange_key`
#### Parameters
| `code` | ✓ | | `"string".to_string()` |
#### Example Snippet
```rust
let client = sideko_rest_api::SidekoClient::default()
.with_api_key_auth(&std::env::var("API_KEY").unwrap())
.with_cookie_auth(&std::env::var("API_KEY").unwrap());
let res = client
.auth()
.exchange_code(sideko_rest_api::resources::auth::ExchangeCodeRequest {
code: "string".to_string(),
})
.await;
```
#### Response
##### Type
[UserApiKey](/src/models/user_api_key.rs)
##### Example
```rust
UserApiKey {avatar_url: "http://www.example.com".to_string(), created_at: "1970-01-01T00:00:00".to_string(), email: "mail@example.com".to_string(), expiration: Some("1970-01-01T00:00:00".to_string()), first_name: "string".to_string(), id: "3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a".to_string(), is_service_account: true, last_name: "string".to_string(), api_key: "sideko_live_abc123".to_string()}
```