Reference for the Magic Admin SDK for Golang: https://github.com/magiclabs/magic-admin-go
The Magic SDK for server-side Golang makes it easy to leverage Decentralized ID Tokens to authenticate your users for your app. This guide will cover some important topics for getting started with server-side APIs and to make the most of Magic's features.
Install the Magic Admin SDK to get started
View the API documentation below to learn the methods you'll be using
Go to Examples for an introduction to common patterns and use-cases
The SDK requires
Golang 1.13+ and Go Modules. To make sure your project is using Go Modules, you can look for
go.mod file in your project's root directory. If it exits, then you are already using the Go Modules. If not, you can follow this guide to migrate to Go Modules.
magic-admin-go in a Go program with an
import of the SDK:
Run any of the normal
go commands (ex:
install). The Go toolchain will take care of fetching the SDK automatically.
Alternatively, you can explicitly
go get the package into a project:
Creating an SDK Client Instance
Client handles all the Magic API requests for your application. To instantiate:
Creating a Token Instance
Token provides methods to interact with DID Token.