# Error Registering Endpoint

**URL:** <https://discussions.flightaware.com/t/error-registering-endpoint/18857>\
**Category:** AeroAPI\
**Created:** [August 13, 2016, 8:53am UTC](https://discussions.flightaware.com/t/error-registering-endpoint/18857 "2016-08-13T08:53:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rmenn](https://avatars.discourse-cdn.com/v4/letter/r/67e7ee/32.png) [@rmenn](https://discussions.flightaware.com/u/rmenn)\
**Post date:** [August 13, 2016, 8:53am UTC](https://discussions.flightaware.com/t/error-registering-endpoint/18857/1 "2016-08-13T08:53:40Z")

</div>

Im trying to register an endpoint but i get a notification saying that my format\_type is Invalid.

```auto

INVALID: unsupported format_type

```

I am setting it as

```auto

json/post

```

Any help here would be appreciated.

Thanks

---

<div class="post-metadata">

**Author:** ![bovineone](https://sea1.discourse-cdn.com/flex019/user_avatar/discussions.flightaware.com/bovineone/32/117631_2.png) [@bovineone](https://discussions.flightaware.com/u/bovineone)\
**Post date:** [August 13, 2016, 2:48pm UTC](https://discussions.flightaware.com/t/error-registering-endpoint/18857/2 "2016-08-13T14:48:55Z")

</div>

Can you show your code for invoking it. I suspect the arguments aren’t getting passed correctly.

---

<div class="post-metadata">

**Author:** ![rmenn](https://avatars.discourse-cdn.com/v4/letter/r/67e7ee/32.png) [@rmenn](https://discussions.flightaware.com/u/rmenn)\
**Post date:** [August 13, 2016, 4:07pm UTC](https://discussions.flightaware.com/t/error-registering-endpoint/18857/3 "2016-08-13T16:07:32Z")

</div>

Im using the golang library. But the fields are the same. If there a way to check on the server, how it received the request? My code is below.

```auto

	response, err := flightaware.DefaultLocalAPIClient.RegisterAlertEndpoint(
		basicAuth.NewContext(context.Background()),
		&flightaware.RegisterAlertEndpointRequest{
			Address: "http://requestb.in/swvaqhsw",
			FormatType: "json/post",
		},
	)

```

---

<div class="post-metadata">

**Author:** ![bovineone](https://sea1.discourse-cdn.com/flex019/user_avatar/discussions.flightaware.com/bovineone/32/117631_2.png) [@bovineone](https://discussions.flightaware.com/u/bovineone)\
**Post date:** [August 13, 2016, 4:22pm UTC](https://discussions.flightaware.com/t/error-registering-endpoint/18857/4 "2016-08-13T16:22:34Z")

</div>

It would be easier if you enable verbose debugging to see how the request is being serialized. The capitalization of the arguments in your source code does not match our documentation/wsdl, so I hope your library is responsible for adjusting the output request to match our expectations.

---

<div class="post-metadata">

**Author:** ![rmenn](https://avatars.discourse-cdn.com/v4/letter/r/67e7ee/32.png) [@rmenn](https://discussions.flightaware.com/u/rmenn)\
**Post date:** [August 13, 2016, 4:34pm UTC](https://discussions.flightaware.com/t/error-registering-endpoint/18857/5 "2016-08-13T16:34:18Z")

</div>

Capitialization is just a part of the the conversion from wsdl to golang. So it should not be a problem. I am infact having this problem with the register endpoint call, have been making the FlightInfo call all day and its been giving me the appropriate response.

The Go Library

[github.com/peter-edge/flightaware](https://github.com/peter-edge/flightaware)

---

<div class="post-metadata">

**Author:** ![bovineone](https://sea1.discourse-cdn.com/flex019/user_avatar/discussions.flightaware.com/bovineone/32/117631_2.png) [@bovineone](https://discussions.flightaware.com/u/bovineone)\
**Post date:** [August 15, 2016, 3:50pm UTC](https://discussions.flightaware.com/t/error-registering-endpoint/18857/6 "2016-08-15T15:50:49Z")

</div>

Can you confirm whether this line is using URL encoding or JSON encoding? It really needs to be GET-style form variables, or POST using application/x-www-form-urlencoded.

[github.com/peter-edge/flightawa … en.go#L663](https://github.com/peter-edge/flightaware/blob/master/go/flightaware.gen.go#L663)
