## Get Credential Secret by ID

`client.Credentials.Decrypt(ctx, credentialID) (*CredentialSecret, error)`

**post** `/v5/credentials/{credential_id}/secret`

Retrieve the plaintext payload of a credential by its ID.

### Parameters

- `credentialID string`

### Returns

- `type CredentialSecret struct{…}`

  - `Result string`

  - `Object string`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/scaleapi/sgp-dev-go"
  "github.com/scaleapi/sgp-dev-go/option"
)

func main() {
  client := sgpdev.NewClient(
    option.WithAPIKey("My API Key"),
    option.WithAccountID("My Account ID"),
  )
  credentialSecret, err := client.Credentials.Decrypt(context.TODO(), "credential_id")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", credentialSecret.Result)
}
```

#### Response

```json
{
  "result": "result",
  "object": "object"
}
```
