Basic Question Testing the APIs

72 views
Skip to first unread message

Chi-Shing Tong

unread,
Jan 11, 2024, 1:54:10 AM1/11/24
to motorsportreg-api-developers
Hi,

1) Do I need to be an organizer to use the APIs? I am trying to build a site for my personal use that will make sure of these APIs.
2) I am trying to test simple API call provided in the doc but I keep getting 401 Not authenticated either from direct curl command or POSTMAN. Maybe this is related to question 1.
curl -u userid:password -X GET https://api.motorsportreg.com/rest/calendars.json

Thanks,
Chishing

Chi-Shing Tong

unread,
Jan 21, 2024, 3:12:27 AM1/21/24
to motorsportreg-...@googlegroups.com
HI, is there anyone who can help? I am trying to make an API call that will search events based on location.

But none of the following APIs work for me. I am calling this API using my username and password and I am not an organization. Must I be an organization to call these APIs using the header -H "X-Organization-Id: {your-id-here}"?
GET /rest/calendars
GET /rest/postalcodes/{postal_code}

Thanks,
Chishing

--
You received this message because you are subscribed to the Google Groups "motorsportreg-api-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to motorsportreg-api-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/motorsportreg-api-developers/8f44c545-d3ae-4a39-8246-9165cc944d22n%40googlegroups.com.

Brian Ghidinelli

unread,
Jan 31, 2024, 4:54:19 PM1/31/24
to motorsportreg-api-developers
Chishing, 

Sorry we missed your previous post. A few notes:

1. You do need to have at least read-permissions for an organization in order to access any endpoint that requires an `X-Organization-ID` header. There are other endpoints which require OAuth tokens to access on behalf of a user where you can use that approach instead. 

If you are after events from our calendar, I would highly recommend our new GraphQL API which is desired for building mashups and uses a more straightforward API key. You can see docs here: https://assets.motorsportreg.com/gec/docs/.  To get an API key, please contact our support team thru MotorsportReg.com and they can assist.

2. You will get 401 if you don't have the right access - so that's expected. #1 will solve it!


Brian
Reply all
Reply to author
Forward
0 new messages