GET | List an API secret by [identifier]
  • 2 minutes to read
  • Dark
    Light
  • PDF

GET | List an API secret by [identifier]

  • Dark
    Light
  • PDF

Article summary

Access information of an API secret stored MySafe.

Requirements

  • API secret access in MySafe.

Request

GET api/mysafe/secretapi/[identifier]

Request parameters

Send the parameter below in the path of the URL.

identifier - int - required - API secret unique identification code.Note: this value is automatically assigned by senhasegura in POST | Create API secret and is obtained in the response to the GET | List all API secrets.

Example request

GET {{url}}api/mysafe/secretapi/3.

Response

HTTP/1.1 200 OK
{
    "code": 200,
    "response": {
        "status": 200,
        "message": "Success",
        "error": false,
        "error_code": 0,
        "detail": "",
        "Message": "Success",
        "erro": false,
        "cod_erro": 0
    },
    "api_secret_entity": {
        "identifier": "3",
        "name": "GCP1",
        "url": "https://gcp1.com",
        "client_secret": "hy7464g5v8ghy4d858jk7fds57t4tr",
        "client_id": "hb455f7g8fg9dfg8yt845bxxku",
        "identifier_code": "12534",
        "method": "get",
        "tags": "Cloud1",
        "notes": "Access details for this API secret",
        "users_allowed": [
            {
                "name": "alices",
                "can_edit": true
            }
        ],
        "groups_allowed": []
    }
}

Reponse body fields

api_secret_entity - object - Data of the stored API secret.


    → identifier - int - API secret unique identification code.


    → name - string - Name assigned to the API secret.


    → url - string - required - URL of the website where the API secret will be used.


    → client_secret - string - The secret used to the authenticate the application.


    → client_id - string - required - ID of the client application.


    → dentifier_code - string - Unique string defined by the user to identify the API secret.


    → method - string - The HTTP method to be used in the API call.


    → notes - string - Observations about the API secret.


    → tags - string - Keywords associated with the API secret.


    → users_allowed - array of objects - Data of the users with access to the API secret.


    → groups_allowed - array of objects - Data of the groups with API secret access.

Errors

400 - Bad Request.

Message: "1010: Unexpected identifier type"

Possible cause: the identifier provided wasn't recognized as valid.

Solution: check the value of the identifier and resend the request.

Message: "1005: Api secret not found"

Possible cause: the API secret wasn't found.

Solution: check the value of the identifier and resend the request.

Message: "1006: User does not have access"

Possible cause: user doesn't have access to the API secret.


Message: "1009: Inactive Api secret"

Possible cause: inactive API secret.

Solution: enable the API secret through the path POST api/mysafe/password/active[identifier].
500 - Internal Server Error.

Message: "Unexpected error."

Possible cause: the error is on the senhasegura server.

Solution: contact the support team for more information.


No route matched with those values.

Message: "No route matched with those values."

Possible causes: failure in your application authentication with the senhasegura server or incorrect URL.

Solution: check the authentication parameters such as Access Token URL, Client ID and Client Secret and request a new access token or check and correct the URL.


An invalid response was received from the upstream server .

Message: "An invalid response was received from the a seupstream server

Possible cause: the upstream server may be taking too long to respond, leading to a timeout error that is interpreted as an invalid response by the proxy/gateway server.

Solution: check the connectivity between the source of the request and the senhasegura server.


The upstream server is timing out.

Message: "The upstream server is timing out"

Possible cause: the request time has expired.

Solution: check the connectivity between the source of the request and the senhasegura server.



Was this article helpful?

What's Next