That just tells the operating system to run the cURL program. Let's post a status update! Here is what mine looks like (except, that's no longer my access token because you're supposed to keep that secure).Ĭurl -H 'Authorization: Bearer 4-Y3nDFgrz8hV7WmbRqDAV52TiAnsQ8jeSvfbYN0g30' -F 'status=Look Mom, I can update my status via Mastodon's API!' With those, you are ready to make your first Mastodon API request. Your Mastodon account's access token is the access token I showed you in step 7 above. Some other common ones are mastodon.social, switter.at, mastodon.xyz, and alive.bar. Your Mastodon server's address is the address you go to in a web browser to sign into Mastodon. You are going to need a couple pieces of information to communicate with the Mastodon API: I am using cURL version 7.68.0, but whatever version you have should work just fine. You can confirm by opening a terminal, and entering curl -V. You probably already have cURL installed on your computer. We will use HTTP requests to communicate with Mastodon's API.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |