// GetToken gets a device token.
GetToken gets a device token.
// GetToken gets a device token .
func (c Config) GetToken(ctx context.Context, deviceCode string) (*Token, *atlas.Response, error) {
	req, err := c.NewRequest(ctx, http.MethodPost, deviceBasePath+"/token",
		url.Values{
			"client_id":   {c.ClientID},
			"device_code": {deviceCode},
			"grant_type":  {"urn:ietf:params:oauth:grant-type:device_code"},
		},
	)
	if err != nil {
		return nil, nil, err
	}
	var t *Token
	resp, err2 := c.Do(ctx, req, &t)
	if err2 != nil {
		return nil, resp, err2
	}
	return t, resp, err2
}
func ( c Config ) GetToken ( ctx context . Context , deviceCode string ) ( * Token , * atlas . Response , error ) { req , err := c . NewRequest ( ctx , http . MethodPost , deviceBasePath + " " , url . Values { " " : { c . ClientID } , " " : { deviceCode } , " " : { " " } , } , ) if err != nil { return nil , nil , err } var t * Token resp , err2 := c . Do ( ctx , req , & t ) if err2 != nil { return nil , resp , err2 } return t , resp , err2 }
GetToken gets a device token.
GetToken gets a device token .