# How to create course using API?

**URL:** <https://discuss.openedx.org/t/how-to-create-course-using-api/8471>\
**Category:** Development\
**Tags:** how-to\
**Created:** [October 11, 2022, 5:58am UTC](https://discuss.openedx.org/t/how-to-create-course-using-api/8471 "2022-10-11T05:58:22Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![braden](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/braden/32/46_2.png) [@braden](https://discuss.openedx.org/u/braden)\
**Post date:** [October 14, 2022, 1:39am UTC](https://discuss.openedx.org/t/how-to-create-course-using-api/8471/5 "2022-10-14T01:39:52Z")

</div>

Did you generate the CSRF token using the same credentials (e.g. OAuth bearer token or JWT) that you’re using to authenticate the request? Try using the `/csrf/api/v1/token` API endpoint to retrieve the CSRF token, then submit it with `X-CSRFToken`.

---

_[View the full topic](https://discuss.openedx.org/t/how-to-create-course-using-api/8471)._
