SelfOAuth2

linkOauth2MistAccount

POST
/api/v1/self/oauth/{provider}

Link Mist account with an OAuth2 Provider

Authorization

Authorization<token>

Preferred authentication method for automation and integrations. Send the API token in the HTTP Authorization header.

Format: Authorization: Token {apitoken}

Notes:

  • An API token generated for a specific admin has the same privileges as that admin
  • An API token is automatically removed if it is not used for more than 90 days
  • SSO admins cannot generate admin API tokens. Use organization API tokens when scoped Org/Site privileges are needed.

In: header

Path Parameters

provider*string

Request Body

application/json

Request Body

Request body containing a single authorization or claim code

code*string

Request-supplied authorization or claim code value

Response Body

curl -X POST "https://example.com/api/v1/self/oauth/string" \  -H "Content-Type: application/json" \  -d '{    "code": "4/S9tegDeLkrYg0L9pWNXV4cgMVbbr3SR9t693A2kSHzw"  }'
{  "action": "oauth account linked",  "id": "google_user_id"}