Skip to Content
Social Accounts

Add a social account

POST
/social-accounts

Header Parameters

Accept*string

application/json

Authorization*string

Bearer {{access_token}}

Content-Type*string

application/json

Request Body

A JSON object containing the resource data

application/json
  1. body
provider*SourceProviderName

The name of the source code provider

Value in"bitbucket""github""gitlab"
callback_code*string

The temporary code forwarded by the OAuth provider as a parameter to our callback URL. Must be at least 8 characters.

Response Body

Created

application/json
  1. response
id*integer

The ID of the given social account

user_id*integer

The current user's ID

provider*SocialAccountProvider

The name of the Social Authentication provider

Value in"bitbucket""clerk""facebook""github""gitlab""google"
provider_human_readable*SocialAccountDisplayableName

A formatted version of the provider field value, aligned with the provider's name branding

Value in"Bitbucket""Clerk""Facebook""GitHub""GitLab""Google"
provider_user_nickname*string

The nickname of the user on the Source Authentication provider

is_vcs*boolean

Tells if the social account provider is a Source Code Provider/Version Control System. e.g. false for Facebook, true for Github

token_expires_at*|

The date and time indicating when the authentication token will expire at

created_at*string

The date and time when the record was created

updated_at*string

The date and time when the record was last updated

Example Request
curl -X POST 'https://api.devopness.com/social-accounts' \  -H 'Accept: application/json' \  -H 'Authorization: Bearer <your_api_token>' \  -H 'Content-Type: application/json' \  -H 'Content-Type: application/json' \  -d '{  "provider": "bitbucket",  "callback_code": "a606964974b5fb082971"}'
Example Response
{  "id": 85324,  "user_id": 6589,  "provider": "github",  "provider_human_readable": "GitHub",  "provider_user_nickname": "Joe Smith",  "is_vcs": true,  "token_expires_at": "2020-09-25T15:50:48.000000Z",  "created_at": "2019-09-25T15:50:48.000000Z",  "updated_at": "2019-09-25T15:50:48.000000Z"}