Quickstart

This guide will help you get set up and ready to use the SELF naming resolution, direct or by API. We’ll cover how to get started as an API client or utilizing the sample code and how to make your first smart contract call or SELF-API request. We'll also look at where to go next to find all the information you need to take full advantage of our REST API.

Choose your client

Before making your first SELF call, you need to pick which API client or framework boilerplate you will use. In addition to good ol' cURL HTTP requests, SELF offers integrations for a variety of programming languages and frameworks. Here are some examples.

# cURL is most likely already installed on your machine, to check your version of cURL: 
curl --version

curl 7.64.1 (x86_64-apple-darwin19.0) libcurl/7.64.1 (SecureTransport) LibreSSL/2.8.3 zlib/1.2.11 nghttp2/1.39.2
Release-Date: 2019-03-27
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS GSS-API HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz MultiSSL NTLM NTLM_WB SPNEGO SSL UnixSockets

Making your first API request

After picking your preferred client, you can make your first call to the Protocol API. Below, you can see how to send a GET request to the Conversations endpoint to get a list of all your conversations. In the cURL example, results are limited to ten conversations, the default page length for each client. Please note these calls are existing plucks from our codebase, our dev team can assist in getting started.

GET
/v1/nameresolving
curl -G https://self-api.com/api/v1/evm/papajohns
  -H "Authorization: Bearer {token}" \
  -d limit=1

What's next?

You are now set up with an API config and will be able to resolve your first SELF name . Here are a few links that might be handy as you venture further into the SELF API: